02-05-2010
closed
thousand thanks! works wonderfully!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a variable read from user input:
PROFILESROOTDIR="\\194.185.82.188\CMSRepository\EncodingProfiles"
awk -F"=" -v gr=$PROFILESROOTDIR '/ProfilesRootDirectoryFromXOEMachine/{$2=gr;}1' OFS="=" $CFGFILE > "${CFGFILE}_new"
For this awk to work properly I need to replace in the... (7 Replies)
Discussion started by: potro
7 Replies
2. Shell Programming and Scripting
Hi,
I would like:
FastEthernet0/0 is up, line protocol is up
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 output errors, 0 collisions, 0 interface resets
Serial1/0:0 is up, line protocol is up
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0... (14 Replies)
Discussion started by: mv652
14 Replies
3. Shell Programming and Scripting
Hello Friends,
I have got, this output below and i want to extract the name of symlink which is highlighted in red and the path above it highlighted in blue. At the end i want to append path and symlink.
/var/tmp/asirohi/jdk/jre
/var/tmp/asirohi/jdk/jre/.systemPrefs... (3 Replies)
Discussion started by: asirohi
3 Replies
4. Shell Programming and Scripting
input
output
a1 100 200 XYZ_X
a1 98 188 ABC (2 Replies)
Discussion started by: quincyjones
2 Replies
5. Shell Programming and Scripting
Hello,
I couldn't find anything on the Forum that would help me to solve this problem. Could any body help me process below data using awk?
I have got two files:
file1:
Worker1: Thomas
Position: Manager
Department: Sales
Salary: $5,000
Worker2: Jason
Position: ... (5 Replies)
Discussion started by: killerbee
5 Replies
6. Shell Programming and Scripting
Both of these fail. One has two form feeds, the second form leaves all the backslashes.
bold='\(code\|command\|var\|samp\|option\|strong\)'
sed -e "s;@${bold}{"'\(*\)};\fB\2\fP;g'
sed -e "s;@${bold}{"'\(*\)};\\fB\2\\fP;g'
Obviously, I'm trying to change texi markup into man page markup, but it... (3 Replies)
Discussion started by: bkorb
3 Replies
7. Shell Programming and Scripting
I am trying to output all lines in a file where $7 is less than 30. The below code does create a result file, but with all lines in the original file. The original file is tab deliminated is that the problem? Thank you :).
awk 'BEGIN{FS=OFS=","} $7 < 30 {print}' file.txt > result.txt... (3 Replies)
Discussion started by: cmccabe
3 Replies
8. Shell Programming and Scripting
I have two large files (~250GB) that I am trying to remove the where GT: 0/0 or 1/1 or 2/2 for both files. I was going to use a bash with the below awk, which I think will find each line but how do I remove that line is that condition is found? Thank you :).
Input
20 60055 . A ... (4 Replies)
Discussion started by: cmccabe
4 Replies
9. Shell Programming and Scripting
In the awk below which does execute I get output that is close, except for all the lines that start with a # are removed. Some lines have one others two or three and after the script adds the
ID= to the fields below the pattern in the awk, I can not seem to add the # lines back to the output. ... (5 Replies)
Discussion started by: cmccabe
5 Replies
10. Shell Programming and Scripting
The awk below executes and produces the current output, which is correct, except I can not seem to include the header lines # and ## in the output as well. I tried adding !/^#/ thinking that it would skip the lines with # and output them but the entire file prints as is. Thank you :).
file
... (8 Replies)
Discussion started by: cmccabe
8 Replies