10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need help with extract/print lines till stop pattern. This needs to happen after every 3rd occurrence of start pattern and continue till end of file. Consider below is an example of the log file. my start pattern will be every 3rd occurrence of ERROR_FILE_NOT_FOUND and stop pattern will be... (5 Replies)
Discussion started by: NSS
5 Replies
2. Shell Programming and Scripting
Hi Gurus, i need your help to create a script the will print a characters after the pattern was found.
Sample lines are below:
My birthday:"1977-16-07", My birthday:"1975-16-07"
My birthday:"1970-16-07".
My patter should be "birthday:", then i want to print the following characters which... (18 Replies)
Discussion started by: scripter123
18 Replies
3. Shell Programming and Scripting
I have this content in file
sshd : ALL : allow
SSHD : all : ALLOW
sshD : All : AllOW
What I need is to print the occurrence of "sshd:all" regardless of the spaces between them and if lower/upper case. So all lines should be printed in output when "grepped" or "printed... (3 Replies)
Discussion started by: anil510
3 Replies
4. Shell Programming and Scripting
Hi All,
From the below line if we want to display all the text till found pattern dot/. I was trying with the below code but couldn't able
to print text before the pattern. it display texts which is found after pattern.
awk '/assed/{print;getline;print}' file_name | sed 's/^*. *//'
input... (4 Replies)
Discussion started by: Optimus81
4 Replies
5. Shell Programming and Scripting
Hi,
I have a folder with multiple (< 33) .log files.
And I have to copy the lines between two patterns from all the .log files to a new file.
(script file with a loop?)
Thanks in advance.
1.log
...
..
xx1> begin
...
..
..
>>> Total: 2 Alarms
..
.. (17 Replies)
Discussion started by: AK47
17 Replies
6. Shell Programming and Scripting
Is there a way with aw to print all lines after a string is found
There is a file like this
.......
........
2012/19/11 :11.58 PM some data
lne no date
2012/19/11 :11.59 PM some other data
2012/20/11 :12.00 AM some other data
some line without dates
some more lines without dates... (8 Replies)
Discussion started by: swayam123
8 Replies
7. Shell Programming and Scripting
Hi all,
I'd like to print the next word after a found pattern.
example text:
word1 word2 word3 word4 pattern word5
pattern word1 word2 word3 word4
word1 word2 pattern word4
basiclly the word after pattern.
Thanks (9 Replies)
Discussion started by: stinkefisch
9 Replies
8. Shell Programming and Scripting
Hi All,
I want to remove first few characthers from starting of the line till ',' Comma... which needs to be done for all the lines in the file
Eg:
File content
1,"1234",emp1,1234
2,"2345",emp2,2345
Expected output is
,"1234",emp1,1234
,"2345",emp2,2345
How can parse... (4 Replies)
Discussion started by: kiranlalka
4 Replies
9. Shell Programming and Scripting
Is there any way to print all the string till we get a space and a number and store it a variable
for eg we have string java.io.IOException: An existing connection was forcibly closed by the remote host 12
All I want is to store "java.io.IOException: An existing connection was forcibly closed... (13 Replies)
Discussion started by: villain41
13 Replies
10. Shell Programming and Scripting
Dear All
I have a file like this
112534554
446538656
444695656
225696966
226569744
228787874
113536566
443533535
222564552
115464656
225445345
225533234
I want to cut the file into different parts where the first two columns are '11' . The first two columns will be either... (3 Replies)
Discussion started by: anoopvraj
3 Replies