Sponsored Content
Top Forums Shell Programming and Scripting Need urgent help with PERL scripting Post 302599138 by jacobs.smith on Thursday 16th of February 2012 10:16:06 AM
Old 02-16-2012
Please provide tab delimited output for the next time. Check this one out.

Your input file was edited this way


Quote:
| gdshfghfhdfhdfhdfhdfh | wwwwwwwwww | 1 | 0.024 | 0.021 | 0.030 | 0.024 | A ^ -> X ^ |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfhdfhds | wwwwwwwwww | 2 | 0.037 | 0.021 | 0.063 | 0.061 | A ^ -> X ^ |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfhdfhd | wwwwwwwwww | 2 | 0.032 | 0.020 | 0.041 | 0.092 | A ^ -> X v |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfhdfhd | wwwwwwwwww | 1 | 0.015 | 0.014 | 0.021 | 0.107 | A v -> X ^ |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfhdfhd | wwwwwwwwwwww | 1 | 0.021 | 0.009 | 0.020 | 0.129 | A ^ -> X ^ |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.011 | 0.010 | 0.020 | 0.140 | A ^ -> X v |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.012 | 0.015 | 0.081 | 0.152 | A v -> X ^ |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 2 | 0.074 | 0.048 | 0.185 | 0.226 | A ^ -> X v |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.111 | 0.067 | 0.089 | 0.337 | A v -> X ^ |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.087 | 0.049 | 0.114 | 0.424 | A ^ -> X v |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.118 | 0.069 | 0.113 | 0.542 | A v -> X ^ |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.117 | 0.062 | 0.109 | 0.659 | A ^ -> X v |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.112 | 0.064 | 0.109 | 0.770 | A v -> X ^ |
Your output

Quote:
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 2 | 0.074 | 0.048 | 0.185 | 0.226 | A ^ -> X v |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.111 | 0.067 | 0.089 | 0.337 | A v -> X ^ |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.087 | 0.049 | 0.114 | 0.424 | A ^ -> X v |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.118 | 0.069 | 0.113 | 0.542 | A v -> X ^ |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.117 | 0.062 | 0.109 | 0.659 | A ^ -> X v |
| gdshfghfhdfhdfhdfhdfh gdshfghfhdfhdfh | wwwwwwwwww | 1 | 0.112 | 0.064 | 0.109 | 0.770 | A v -> X ^ |
Code I have used
Quote:
awk -F"|" '{if($5>0.05) print $0}' inputfile
Thanks to all these forum members, for making me a simple awk programmer. It promotes learning a lot.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

help needed in shell scripting......urgent

Dear friends, please help me to solve following problem. I'm running a frontend application from which i'll be invoking the shell script with arguments as given below -driver -w -p "ABC XYZ" -S -ds con -dn "abc xyz" i am getting $1=-driver $2=-w $3=-p $4="ABC $5=XYZ" $6=-S $7=-ds... (3 Replies)
Discussion started by: swamymns
3 Replies

2. Shell Programming and Scripting

Please help me out:-Its Urgent-C Shell Scripting

Hi Friends, I am new to this forum as well as new to shell scripting. I have a problem here and i need someone to solve this. Let us consider there are two processes(abc & def).There is a script which kills these two processes(i.e killtheprocess abc). Here abc is the argument . There... (0 Replies)
Discussion started by: Prince89
0 Replies

3. Shell Programming and Scripting

Umbrella Scripting(very Urgent)

Hi All, Can anybody help me to write the umbrella script for the following? I have three steps to do. STEP 1: CONVERT XML files to PS files STEP 2: CONVERT ALL PS FILES TO PDF FILES STEP 3: FTPING ALL PDF FILES TO THE SERVER. I have the codes for the above three steps. Now I... (6 Replies)
Discussion started by: sunitachoudhury
6 Replies

4. Shell Programming and Scripting

Urgent Korn Shell scripting Help Pleaaaase...

Hello All, Can someone help me to set a user's password from the script using korn shell. The password change is a one time password after user account creation. I tried providing the input file as the value for password field but password change requires tty so my password from an input file... (3 Replies)
Discussion started by: solaix14
3 Replies

5. Shell Programming and Scripting

it's urgent ! round number in perl scripting

my $number = 12.345673412 I need 3 digits after decimal or after dot(.) i mean , i need only 12.345 I used int(), ceil(), floor() but it gives me only 12 I need it. (10 Replies)
Discussion started by: pritish.sas
10 Replies

6. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

7. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

8. What is on Your Mind?

Shell Scripting vs Perl scripting

Gents, I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies

9. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies
All times are GMT -4. The time now is 01:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy