10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Forum Members,
I am trying to write a script for a requirement where i have to recursively search for a pattern and replace it with the new string in run time from user inputs
grep -ohr "]*.xyz.com]*" $HOME/source/group/ | sort | uniq > $HOME/output.txt
while read -r -u9 line;
... (4 Replies)
Discussion started by: raokl
4 Replies
2. Shell Programming and Scripting
Hi ,
I have a file where i have modifed certain things compared to original file . The difference of the original file and modified file is as follows.
# diff mir_lex.c.modified mir_lex.c.orig
3209c3209
< if(yy_current_buffer -> yy_is_our_buffer == 0) {
---
>... (5 Replies)
Discussion started by: breezevinay
5 Replies
3. Shell Programming and Scripting
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
9 Replies
4. Shell Programming and Scripting
Hello every,
I am stuck in a problem. I have file like this. I want to add the fifth field of the match pattern line above the lines starting with "# @D". The delimiter is "|"
eg
>
# @D0.00016870300|0.05501020000|12876|12934|3||Qp||Pleistocene||"3 Qp Pleistocene"|Q
# @P... (5 Replies)
Discussion started by: jyu3
5 Replies
5. Shell Programming and Scripting
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Discussion started by: rbalaj16
5 Replies
6. Shell Programming and Scripting
14:15:00-
abcdefghijkl.
14:30:00-
abcdefghijkl.
14:35:00-
abcdefghijkl.
123456789.
123456789.
14:45:00-
abcdefghijkl.
14:50:00-
abcdefghijkl.
123456789.
15:30:00-abcdefghijkl. (3 Replies)
Discussion started by: dev_shivv
3 Replies
7. Solaris
For example a log file looks like below-
13:30:00-
abcdefghijklhjghjghjhskj.
abcdefghijkl.
14:15:00-
abcdefghijkl.
14:30:00-
abcdefghijkl.
14:35:00-
abcdefghijkl.
123456789.
123456789.
14:45:00-
abcdefghijkl. (0 Replies)
Discussion started by: dev_shivv
0 Replies
8. UNIX for Dummies Questions & Answers
Hi gurus,
A file contains many words in format "ABC.XXXX.XXXX.X.GET.LOG" (X->varying). Now my shell script want this list (only words in formatABC.XXXX.XXXX.X.GET.LOG ) to continue the process. Pls help me.
Thanks,
Poova. (8 Replies)
Discussion started by: poova
8 Replies
9. Shell Programming and Scripting
Hello,
Actually i want to replace the word after a matched pattern.
For Ex:
lets say that i am reading a file line by line
while read line
do
echo $line
# i need to search whether a pattern exists in the file and replace the word after if the pattern exist.
# for example :... (1 Reply)
Discussion started by: maxmave
1 Replies
10. Shell Programming and Scripting
Hi ,
If I match a word in a file, I want to pick the next line of that matched word.
My file is a below format-
The ntrag trace has auditError
Line5005 contains transaction Ntrag data
------------
Here I wanted if I match a word auditError, I need to get the next line
"Line5005... (10 Replies)
Discussion started by: Muktesh
10 Replies