10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
11 Replies
2. Shell Programming and Scripting
Hi all,
I want to search for strings in file1 that can be found in file2 and print out the whole line when matching pattern is found.
I have used the below command, but this is not working for me, because it is writing out only the matching patterns from file2, not the whole line.
fgrep -o... (2 Replies)
Discussion started by: MonikaB
2 Replies
3. UNIX for Dummies Questions & Answers
When I try with patern matching in a file with below code works
cat scj_drive_commands | egrep '/app/oracle/build_lib/pkg32|/app/oracle/build_lib/pkg33'
But when I have code with patern searching using of below does not work !
cat scj_drive_commands | egrep... (3 Replies)
Discussion started by: Siva SQL
3 Replies
4. Shell Programming and Scripting
Hi,
I am trying to locate the occurences of certain pattern like 'Possible network disconnect' in a text file. I can get the actual lines matching the pttern using:
grep -w 'Possible network disconnect' file_name.
But I am more interested in getting the timing of these events which are... (7 Replies)
Discussion started by: sagarparadkar
7 Replies
5. Shell Programming and Scripting
Hi all,
I have to check whether certain files exist using a if statement. I have to check this by matching a pattern of filename: e.g.
if ]
This statement should be "true" if any files like test.dat11, test.dat22 etc are present in the source dir. However, this statement is checking only... (2 Replies)
Discussion started by: sweety123
2 Replies
6. Shell Programming and Scripting
hiii,
i have to write a shell script like this----
i have a huge log file name abc.log .i have to search for a pattern name "pattern",it may occur 1000 times in the log file,every time it finds the pattern it should display the 10 lines above the pattern.
I appericiate your help. (30 Replies)
Discussion started by: namishtiwari
30 Replies
7. Shell Programming and Scripting
I have a text file, a sample of which is as follows:
r/- * 0: WINDOWS/Microsoft.NET/Framework/v2.0.50727/ASP.NETWebAdminFiles/Images/headerGRADIENT_Tall.gif
r/- * 0: WINDOWS/SoftwareDistribution/Download/cf8ec753e88561d2ddb53e183dc05c3e/backoff.jpg
r/- * 0: ... (2 Replies)
Discussion started by: stumpyuk
2 Replies
8. Shell Programming and Scripting
Hi all,
I'm looking for some help. I have a file (very long) that is organized like below:
>Cluster 0
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
Discussion started by: d.chauliac
4 Replies
9. Shell Programming and Scripting
Hi,
I want to list only the file names which do not contain a specific keyword or search string.
OS: Solaris
Also is there any way ; through the same script I can save the output of search to a CSV (comma seperated) so that the file can be used for inventory purpose.
Any assistance will... (5 Replies)
Discussion started by: sujoy101
5 Replies
10. Shell Programming and Scripting
Hi,
I need to redirect the lines in a file to a different file if the character starting from 2 to 6 in the line are numerical .
Please let me know if anyone have any script to do this.
Thanks,
Ranjit (4 Replies)
Discussion started by: torenji
4 Replies