9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a list of value , and need to replace that in my file.
Eg:
File1
tcname:fail
tcname: Pass
tcname:skipped
File2:
01,02,03
Output:
File 1
01:fail
02: Pass
03:Skipped (8 Replies)
Discussion started by: DevAakash
8 Replies
2. Shell Programming and Scripting
Hello
Take this file...
Test01
Ref test
Version 01
Test02
Ref test
Version 02
Test66
Ref test
Version 66
Test99
Ref test
Version 99
I want to substitute every occurrence of Test{2} with a unique random number, so for example, if I was using sed, substitution would be something... (1 Reply)
Discussion started by: funkman
1 Replies
3. Shell Programming and Scripting
datafile:
2017-03-24 10:26:22.098566|5|'No Route for Sndr:RETEK RMS 00040 /ZZ Appl:PF Func:PD Txn:832 Group Cntr:None ISA CntlNr:None Ver:003050 '|'2'|'PFI'|'-'|'EAI_ED_DeleteAll'|'EAI_ED'|NULL|NULL|NULL|139050594|ActivityLog|
2017-03-27 02:50:02.028706|5|'No Route for... (7 Replies)
Discussion started by: SkySmart
7 Replies
4. Shell Programming and Scripting
Hi All,
I have a file testarun.txt contains the below lines and i want to print the lines if the character positions 7-8 matches 01.
201401011111
201401022222
201402013333
201402024444
201403015555
201403026666
201404017777
201404028888
201405019999
201405020000
I am trying the... (4 Replies)
Discussion started by: Arunprasad
4 Replies
5. Shell Programming and Scripting
I have a directory of files, each with a variable (though small) number of lines. I would like to go through each line in each file, and print the:
-file name
-line number
-number of matches to the pattern /comp/ for each line.
Two example files:
cat... (4 Replies)
Discussion started by: pathunkathunk
4 Replies
6. Shell Programming and Scripting
I need to remove double quoted strings from specific lines in a file. The specific line numbers are a variable. For example, line 5 of the file contains
A B C "string"
I want to remove "string". The following sed command works:
sed '5 s/\"*\"//' $file
If there are multiple... (2 Replies)
Discussion started by: rennatsb
2 Replies
7. Shell Programming and Scripting
Hi
I have below script which is used to grep specific errors and if error string matches send an email alert.
Script is working fine , however , i wish to print next 10 lines of the string match to get the details of error in the email alert
Current code:-
#!/bin/bash
tail -Fn0 --retry... (2 Replies)
Discussion started by: neha0785
2 Replies
8. Shell Programming and Scripting
Hey Fellas.
I am new to scripting. I have searched through the forums and found a lot of good info, but I can't seem to get any of it to work together. I am trying to find a particular sting in a file, and if the next string matches certain criteria, replace it with a string from a csv... (6 Replies)
Discussion started by: midniteslice
6 Replies
9. Shell Programming and Scripting
Hi Guys/Gals,
I have a log file that is updated once every few seconds and I am looking for a way to speed up one of my scripts.
Basically what I am trying to do is grep through a text file from start to finish once. Then each subsequent grep starts at the last line of the previous grep to... (4 Replies)
Discussion started by: Jerrad
4 Replies