Sponsored Content
Top Forums UNIX for Advanced & Expert Users awk trouble inside another command Post 303037510 by jim mcnamara on Saturday 3rd of August 2019 07:21:20 PM
Old 08-03-2019
I've stayed away because I could not get past the dsh -w
AIX dsh and linux dash (sometimes dsh) do not have a -w option. Per manpages for both. What does that do -- dsh -w ?

So I'm not sure what is going on. Plus the whole code design concept seems to me to be based on 'one-liner' thinking. Which is cool but not always maintainable as you are finding out.
It looks like you are trying to kill processes with files open - somewhere special. What OS and shell are you using?
 

10 More Discussions You Might Find Interesting

1. AIX

Trouble formatting egrep command with AWK

Hi, I'm new to scripting and AIX. I'm running the following: lspv | awk '{ print "lspv",$1" | egrep 'PP\|PHYSICAL'; lspv -l",$1 }' Which creates this command: lspv hdisk0 | egrep PP|PHYSICAL; lspv -l hdisk0 lspv hdisk1 | egrep PP|PHYSICAL; lspv -l hdisk1 Troube is, I need the... (2 Replies)
Discussion started by: cruiser
2 Replies

2. Shell Programming and Scripting

Running command inside awk

Hi, I have a awk script to read a CSV file. After reading the values i want to call a executable (nameely call_it) with the values what i read from the scv file. I dont want to use system command inside the awk. Is there any other way to run the executable from the awk script Thanks ... (1 Reply)
Discussion started by: Raghuram.P
1 Replies

3. Shell Programming and Scripting

How to use same variable value inside as well as outside of the awk command?

Hi Jim, The following script is in working state. But i m having one more problem with awk cmd. Could you tell me how to use any variable inside awk or how to take any variable value outside awk. My problem is i want to maintain one property file in which i am declaring variable value into that... (12 Replies)
Discussion started by: Ganesh Khandare
12 Replies

4. Shell Programming and Scripting

Trouble with passing Variable from bash to awk gsub command

Would really appreciate it if someone could point out my mistake in this line of code, i've been staring blankly at it trying everything i can think of some time now and coming up with nothing. #!/bin/bash echo "Enter Username" read Username awk -F: -v var=${Username} '/^var:/... (9 Replies)
Discussion started by: Nostyx
9 Replies

5. Shell Programming and Scripting

Multiple command execution inside awk command during xml parsing

below is the output xml string from some other command and i will be parsing it using awk cat /tmp/alerts.xml <Alert id="10102" name="APP-DS-ds_ha-140018-componentFailure-S" alertDefinitionId="13982" resourceId="11427" ctime="1359453507621" fixed="false" reason="If Event/Log Level(ANY) and... (2 Replies)
Discussion started by: vivek d r
2 Replies

6. Shell Programming and Scripting

Help in using date command inside awk

Hi All, bash-3.2$ autorep -J BOX_NAME% -l0 | grep BOX_NAME| awk -f awkScript.awk sh: -c: line 0: unexpected EOF while looking for matching `"' sh: -c: line 1: syntax error: unexpected end of file BOX_NAME SU 06/21/2013 03:44:03 06/21/2013 07:46:37 0 #My awkfile { ... (3 Replies)
Discussion started by: ddspark
3 Replies

7. Shell Programming and Scripting

Grep command inside awk

Hi, I would like to use grep command inside awk. Here is my requirement below : file.txt col1 col2 col3 col 4 col 5 wrxwrx 124 jun 3 Sensex.EMEA wrxwrx 120 jun 4 Emex.US wrxwrx 130 feb 3 passion.AUS wrxwrx 145 feb 9 lession.AUS wrxwrx 130 feb 5 pass.US wrxwrx 130 feb 8... (5 Replies)
Discussion started by: Balasankar
5 Replies

8. Shell Programming and Scripting

Command in inside awk statement

Hello can you please help me with below script which is meant to delete clients from multiple netbackup policies I want to run a command insdie awk statement apparelnlty this script is not working for me for i in $( cat clients_list) do bppllist -byclient $i | awk... (6 Replies)
Discussion started by: Sara_84
6 Replies

9. Shell Programming and Scripting

Trouble with awk command

Hi, I need to read a string with ; separated using loop one filed by one field and perform some operation. Can you please check and let me know how to print command parameterised. key=phani;ravi;kiran number_of_keys=`echo $key|awk '{print NF}' FS=';'` for (( i = 1; i <= $number_of_keys;... (4 Replies)
Discussion started by: Ravindra Swan
4 Replies

10. Shell Programming and Scripting

Trouble using awk command

Hi, I have 2 .txt pads containing data. I need a script which reads content of one .txt file, performs some operations and calculates a number which is stored in a variable. Now , all the content of another .txt pad should be appended to first .txt pad at pre calculated nth line number. ... (4 Replies)
Discussion started by: Ravindra Swan
4 Replies
KILL(1)                                                            User Commands                                                           KILL(1)

NAME
kill - send a signal to a process SYNOPSIS
kill [options] <pid> [...] DESCRIPTION
The default signal for kill is TERM. Use -l or -L to list available signals. Particularly useful signals include HUP, INT, KILL, STOP, CONT, and 0. Alternate signals may be specified in three ways: -9, -SIGKILL or -KILL. Negative PID values may be used to choose whole process groups; see the PGID column in ps command output. A PID of -1 is special; it indicates all processes except the kill process itself and init. OPTIONS
<pid> [...] Send signal to every <pid> listed. -<signal> -s <signal> --signal <signal> Specify the signal to be sent. The signal can be specified by using name or number. The behavior of signals is explained in sig- nal(7) manual page. -l, --list [signal] List signal names. This option has optional argument, which will convert signal number to signal name, or other way round. -L, --table List signal names in a nice table. NOTES Your shell (command line interpreter) may have a built-in kill command. You may need to run the command described here as /bin/kill to solve the conflict. EXAMPLES
kill -9 -1 Kill all processes you can kill. kill -l 11 Translate number 11 into a signal name. kill -L List the available signal choices in a nice table. kill 123 543 2341 3453 Send the default signal, SIGTERM, to all those processes. SEE ALSO
kill(2), killall(1), nice(1), pkill(1), renice(1), signal(7), skill(1) STANDARDS
This command meets appropriate standards. The -L flag is Linux-specific. AUTHOR
Albert Cahalan <albert@users.sf.net> wrote kill in 1999 to replace a bsdutils one that was not standards compliant. The util-linux one might also work correctly. REPORTING BUGS
Please send bug reports to <procps@freelists.org> procps-ng October 2011 KILL(1)
All times are GMT -4. The time now is 03:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy