Write a shell script program to search whether element is present is in the list or not and also display its position in the list.
Here is a shell script program to search whether an element is present in a list and display its position in the list, applicable for both Windows and Linux environments.
```bash
#!/bin/bash
# Define the list of elements
list=("apple" "banana" "cherry" "date" "elderberry")
# Read the element to _______ _______ _______ _______ _________ ______ __________ ___ _____ ___ ______.
_________ ____ __________ _____ ______ _____ _________ _____ ______.
___ _____ ________ ________ ________ __________ __________ ________ ______ _____ ______ ________.
_______ _______ _______ ________ ______ _____.
____ ______ ____ ______ ____.
___ _______ ____ __________ ______ ___ ______ _____ __________ __________ _____.
__________ _____ _________ ___ ________ ______ _____.
________ ____ _________ _____ ________ ________ ____ ______ _______.
____ __________ _________ __________ _____.
______ ______ __________ __________ ___ ___.
_____ ___ _______ ________ ___.
____ ________ _________ ________ ______ ______ ____.
___ ________ ___ _________ ________ _____ ___ ___ ________ _____.
____ ___ ____ _____ _________ ___ _________ ______ ______ ________.
______ __________ ________ ________ __________ _______ _______ _________ ________.
__________ __________ ___ _______ _________ _____.
__________ ________ ____ ______ _____ _______ __________ ________ ___ _______.
____ ___ _______ _______ _______.
_____ _______ _____ ___ _________ _________ _____ _____.
_____ ________ _____ _______ ____ ___ ___ _________ _____ __________.
_________ ___ ________ ____ ___ ______ _________ _________ _______ ______ _______ __________.
_____ __________ ________ ___ _______ _______ ___ _____ _______ _________ ________ ___.
_______ _____ _____ __________ ________.
____ _____ __________ ___ _______ ____ ________ _____ _____.
__________ ________ ________ _______ _______ __________ __________ ________ ____.
_________ ________ ______ ___ _________ ______ ______ ________ ______ __________ __________ _____.
_____ ______ _________ _____ __________ _____.
_______ ________ __________ _____ __________ ______.
___ _________ ____ _______ __________.
_________ ______ ____ ______ ______ _______ _______ __________.
______ _______ ____ ______ __________ ___.
Get Full Answer on WhatsApp