08-04-2008
Sorry, I'm really new to awk, could you explain your line a little? I tried it and it didn't work. What is meant by file and new_file for, is that where the searching is done? Thanks
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Friends,
I want to write a script. The logic follows
1. Script starts
2. SSH to Remote Machine and check whether /home/testUser dir is there or not.
3. If it is there, am assigning a value to a variable. else not
4. If the variable is set, the do the copy from remote machine to my local... (2 Replies)
Discussion started by: balamv
2 Replies
2. Shell Programming and Scripting
hi there
I am trying to get a value from a remote machine into a local variable. To get this value i want to use awk but im having trouble getting it to run, am i escaping in the right places here and using the right quotes (i must have tried a million combinations :()
# VAR=`ssh server1... (5 Replies)
Discussion started by: hcclnoodles
5 Replies
3. Shell Programming and Scripting
Dear All,
we have a command output which looks like :
Total 200 queues in 30000 Kbytes
and we're going to get "200" and "30000" for further process. currently, i'm using :
numA=echo $OUTPUT | awk '{print $2}'
numB=echo $OUTPUT | awk '{print $5}'
my question is : can I use just one... (4 Replies)
Discussion started by: tiger2000
4 Replies
4. Shell Programming and Scripting
Hi,
I'm creating a script where I connet to a remote machine, I execute a command (I get a pid of an application) and I kill the application.
I wrote this:
ssh $HOST_WHITEBOARD<<END
COMMAND_GET_PID_WHITE="ps aux | grep something | awk '/Sl+/ {print \$2}' | awk 'begin {row=0} row==0... (4 Replies)
Discussion started by: abdujaparov
4 Replies
5. Shell Programming and Scripting
flat file looks like
ooss-pfgg-1234,vol_name_1, mail-list
decoded =
hostname,volum_name,mail_list
each line has diff info
am trying to ssh into each fist field, check vol usage for second field, and if greater than 90% send mail to mail-list
got the second and third part working,
... (1 Reply)
Discussion started by: riegersteve
1 Replies
6. Shell Programming and Scripting
Hi all,
Hope someone can help me out here.
I have this BASH script (see below)
My problem lies with the variable path.
The output of the command find will give me several fields. The 9th field is the path. I want to captured that and the I want to filter this to a specific level.
The... (6 Replies)
Discussion started by: Cowardly
6 Replies
7. Shell Programming and Scripting
# dir=/mnt
# ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root@10.0.2.3 'cd $dir;ls'
The $dir doesn't take effect any help?? ( I want use variable to do something
Thanks in advance (1 Reply)
Discussion started by: yanglei_fage
1 Replies
8. Shell Programming and Scripting
Hi All,
i am writing a shellscript to compare cksum of the file in local machine and after copying to remote machine. i am not able to assign command output value to variable in remote machine through SSH. PFB code for this.
code:
###### Get File size of the file in local remote system
... (3 Replies)
Discussion started by: katamsivakumar
3 Replies
9. Shell Programming and Scripting
Hi Guys n Girls,
Below im using a while command to wait for a file on another server then carrying on with the script.....
I dont believe the $Sausage1 variable is being passed to the other server so its not finding the file. If i replace the variable with the date then it works as expected.
... (2 Replies)
Discussion started by: twinion
2 Replies
10. UNIX for Beginners Questions & Answers
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
IGAWK(1) Utility Commands IGAWK(1)
NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO
gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)