10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
How to grep for searching a string within a begin and end pattern of a file.
Sent from my Redmi 3S using Tapatalk (8 Replies)
Discussion started by: Baishali
8 Replies
2. Shell Programming and Scripting
Hi,
How can I use find command to search string/pattern in a file recursively?
What I tried:
find . -type f -exec cat {} | grep "make" \;
Output:
grep: find: ;: No such file or directory
missing argument to `-exec'
And this:
find . -type f -exec cat {} \; -exec grep "make" {} \;... (12 Replies)
Discussion started by: cola
12 Replies
3. Shell Programming and Scripting
Hello,
I have a file which has the below contents :
VG_name LV_name LV_size in MB LV_option LV_mountpoint owner group y
testdg rahul2lv 10 "-A y -L" /home/abc2 ... (6 Replies)
Discussion started by: rahul2662
6 Replies
4. Shell Programming and Scripting
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Discussion started by: swayam123
4 Replies
5. Shell Programming and Scripting
Hi,
I have a file with more than 50,000 lines of records and each record is 50 bytes in length.
I need to search every record in this file between positions 11-19 (9 bytes) and 32-40 (9 bytes) and in case any of the above 2 fields is alpha-numeric, i need to replace the whole 9 bytes of that... (7 Replies)
Discussion started by: kikionline
7 Replies
6. Shell Programming and Scripting
I've got a semicolon delimited file. I would like to search for fields that match a pattern, and not hardcoded eg "mth".
*th=something
If the delimited field fulfills this condition, eg. mth=value
I would like to print out both key and value for some number comparison.
eg. if value > "12"... (5 Replies)
Discussion started by: alienated
5 Replies
7. Shell Programming and Scripting
guys,
I need to know how to assing pattern matched string as an input command variable. Here it goes'
My script is something like this.
./routing.sh <Server> <enable|disable>
## This Script takes an input <Server> variable from this line of the script ##
echo $1 | egrep... (1 Reply)
Discussion started by: raghunsi
1 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I'm new in UNIX , so how to check if stringA is present within stringB ?
Something similar to INSTR function in pl sql...
Thanks a lot. (12 Replies)
Discussion started by: Leo_NN
12 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I have a string assigned to a variable. the string will be a filename. Something like below:
file=testfile.dat.20009080_{arc}_2004809090
I need to check if the filename has a pattern like "_{arc}_" and if so I have to rename the file like below
mv... (6 Replies)
Discussion started by: deepakgang
6 Replies
10. Shell Programming and Scripting
Hi,
I need to search for a multiple string pattern(5 key words) in a file(similar to a flat file) ,and i need to store the output in a another file .
In that file we may have mutiple occurrences of the key words.and i need only the unique.
kindly help out.
Thanks,
Mohana Krishnan (2 Replies)
Discussion started by: krishnan_6015@y
2 Replies