Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mayur1064/selenium-demo-bot
https://github.com/mayur1064/selenium-demo-bot
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/mayur1064/selenium-demo-bot
- Owner: mayur1064
- Created: 2022-11-12T12:58:33.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-22T12:34:40.000Z (25 days ago)
- Last Synced: 2024-10-23T13:12:41.978Z (24 days ago)
- Language: Java
- Size: 59.7 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme
Awesome Lists containing this project
README
#!/bin/bash
# Grep the file for all matching lines
matches=$(grep "your_search_pattern" your_file.txt)# Loop through each line found by grep
while IFS= read -r line; do
# Extract the second word from each line
second_word=$(echo "$line" | awk '{print $2}')
# Check if the second word contains a specific substring
if [[ "$second_word" == *"substring"* ]]; then
echo "Match found: $second_word contains 'substring'"
else
echo "No match: $second_word does not contain 'substring'"
fi
done <<< "$matches"echo "This is a sample line" | awk -F'start_string|end_string' '{print $2}'
grep 'pattern' input_file | awk '{split($3, a, "start_string|end_string"); print $1, a[2], $4}'
awk '{
if (prev && /pattern/) {
print prev_words[3], prev_words[4], $2, $4; # Print 3rd and 4th words from the previous line and 2nd and 4th words from the current line
}
split(prev, prev_words); # Split the previous line into words
prev = $0; # Store the current line as previous
}' input_file