11-12-2014
Having seen my previous post, you certainly are able to identify the errors in your script...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have the below input and i only want to filter out some un-wanted info from here. Expected output is below. Can somebody help ?
The catch is that i want to grep those lines with term "k=" and lines with term "**" as the 1st column and "07" as the last column. And the number of... (15 Replies)
Discussion started by: Raynon
15 Replies
2. Shell Programming and Scripting
I have the a file with the following data.
File Content.
1249 snf06.3.0 sw version 1.1 code MD5 192F MD4 MD3
1248 sns06.3.0 sw version 1.1 code MD5 192F MD12
1250 sns06.3.0 sw version 1.1 code MD5 192F0\ MD8
1241 sns06.3.0 sw code MD5 19
1243 sn06.3.0 sw version 1.1 code MD5 19
12... (17 Replies)
Discussion started by: knijjar
17 Replies
3. UNIX for Advanced & Expert Users
I have a file with the below data, i would like to remove the end blank lines with no data. I used the below commands but could not able to succeed, could you please shed some light.
Commands Used:
sed '/^$/d' input.txt > output.txt
grep -v '^$' input.txt > output.txt
input.txt file... (5 Replies)
Discussion started by: Ariean
5 Replies
4. Shell Programming and Scripting
Hi everyone,
My problem is strange, I cannot think of why this is happening.
I have a set of data that looks like this:
Although it does not look it, the fields are tab delimited. I have made sure of this, and awk does recognize them as such. However, it divides what I would expect... (2 Replies)
Discussion started by: ccox85
2 Replies
5. Shell Programming and Scripting
Here's the command I'm running:
# echo "hi" | awk '{etime = system("hostname") ; close("hostname") ; print etime""}'
And here's the ouput:
server.domain.tld
0
Why in the world is that second line, the one that's just "0", there? Many thanks in advance. (2 Replies)
Discussion started by: treesloth
2 Replies
6. Shell Programming and Scripting
I have a .xml file, where i need some output. The xml file is like:
Code:
<?******?></ddddd><sssss>234</dfdffsdf><sdhjh>534</dfdfa>.........
/Code
I need the output like:
code
234
534
.
.
.
/code
How can i do it? (5 Replies)
Discussion started by: anupdas
5 Replies
7. Shell Programming and Scripting
Hi,
I got a log file and I want to grep out a list of unwanted line which are IP's.
Basiclly I want everything ecxept the ip's from my list.
If I do a
while read line
do
grep -v $ip_from_my_list logfile
done <ip_list
it just grep's one IP at a time and repeats. :(
Thanks for... (3 Replies)
Discussion started by: stinkefisch
3 Replies
8. Shell Programming and Scripting
Hi ,
My output contains the below contents
When i execute
df -h | grep / | grep -v '^Filesystem|tmpfs|cdrom' | awk '{ print $5 " " $1 }'
i get output as below
tpshghghg.fgh.com:/vol/scmvol1/scm-vobstore/WebArch.vbs
1.7T 1.3T 452G 74% /vob/WebArch... (6 Replies)
Discussion started by: ptappeta
6 Replies
9. Shell Programming and Scripting
data.txt:
NEWTEXTS="frq=63,std=-0.00533584,time=Mar-21-(09:15:03)-2016,epoch=1458576903,avg=64.2059,212.698
frq=197,std=0.587585,time=Mar-21-(09:16:02)-2016,epoch=1458576962,avg=64.2059,483.756
frq=178,std=0.503514,time=Mar-21-(09:46:02)-2016,epoch=1458578762,avg=64.2059,500... (5 Replies)
Discussion started by: SkySmart
5 Replies
10. Shell Programming and Scripting
My code fails to do anything if I've BEGIN block in it:
Run the awk script as:
awk -f ~/bin/sum_dupli_gene.awk make_gene_probe.txt
#!/usr/bin/awk -f
BEGIN {
print ARGV
#--loads of stuff
}
END{
#more stuff
} (14 Replies)
Discussion started by: genome
14 Replies