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