Write a bash script that takes a string as an argument and performs the following tasks:

Save the first command line parameter in a variable called input_string.

Remove the shortest match of the pattern “World*” from the end of the string.

Remove the longest match of the pattern “World*” from the end of the string.

Example Output:

$ ./pattern_match_end.sh "HelloWorldWorld"
Original string: HelloWorldWorld
Shortest match removed: HelloWorld
Longest match removed: Hello