10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm on Linux version 2.6.32-696.3.1.el6.x86_64, using the Ksh shell.
I'm working with the input file:
John Daggett, 341 King Road, Plymouth MA
Alice Ford, 22 East Broadway, Richmond VA
Orville Thomas, 11345 Oak Bridge Road, Tulsa OK
Terry Kalkas, 402 Lans Road, Beaver Falls PA
Eric Adams,... (2 Replies)
Discussion started by: prooney
2 Replies
2. 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
3. Shell Programming and Scripting
Hi, i have the below code that will compare the value from 2 variables:
./wlst.sh JMSmon.py > out.dat
w=`sed -e 's/\(.*!\)\(.*\)\(, Queue.*$\)/\2/' out.dat | awk '/'$1'/{n=0;{print $n}}'|head -n 1`
if
then
x=`sed -e 's/\(.*!\)\(.*\)\(, Queue.*$\)/\2/' out.dat | awk '/'$1'/{n=2;next}n{print... (2 Replies)
Discussion started by: scripter123
2 Replies
4. Shell Programming and Scripting
Hi All,
I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file.
Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies
5. Shell Programming and Scripting
Hi,
In a previous, now closed thread, I found the following awk script:
awk '{t=$5" "$6" "$7}END{for (i in t){print i,t}}'
This code does a great job of removing duplicates by the the first four fields from a 7-field set of columns. I would very very much like to understand how this code... (3 Replies)
Discussion started by: pawelrc
3 Replies
6. Shell Programming and Scripting
I have a file with the following content.
> cat /tmp/internetusage.txt
6709.296322 30000 2/7/2010 0.00I am using the following awk command to calculate a percentage from field 1 and 2 from the file.
awk '{ print $1/$2*100 }' /tmp/internetusage.txt
This outputs the value "22.3643" as a... (1 Reply)
Discussion started by: jelloir
1 Replies
7. Shell Programming and Scripting
Hi All,
I have a xml file and requirement is to remove the line feed and add line feed after some element.
<?xml version="1.0" ?>
<AUDITRECORDS>
<CARF>
<HED>
<VN1>20090616010622</VN1>
<VN2>0</VN2>
<VN3>1090</VN3>
<VN4>CONFIG_DATA</VN4>
... (8 Replies)
Discussion started by: sreejitnair123
8 Replies
8. Shell Programming and Scripting
Hi Everyone,
I have:
my @No=qw(032106 032630 0380 034010 035110 0354801111);
my $str_No=join(';', @No);
I have a string $strA="03263033", so in order to determine this $strA area code matches with @No, I can do:
if ( (rindex($str_No,substr($strA,0,5))))== -1) ) {
print "Not... (1 Reply)
Discussion started by: jimmy_y
1 Replies
9. Shell Programming and Scripting
Hello Friends,
In a script i m using different temporary file and i remove them in the end.
During script execution i have some garbage output which is not required.
For example: Garbage Output
++ rm temp_out temp_a temp_b temp_c
++ rm Filter1 Filter2
Script : Even i am redirecting rm... (7 Replies)
Discussion started by: Danish Shakil
7 Replies
10. Shell Programming and Scripting
Hi , I have written a csh script which is as follows but it keeps outputing a unneccesary output as show below. How can i remove that output and prevent it from displaying it when the script runs?
set USER = "aaa"
set PASSWORD = "bbb"
ftp -n 10.80.12.18<<XX
user $USER $PASSWORD... (2 Replies)
Discussion started by: Raynon
2 Replies