10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I tried running this.
dsh -w server1 'lsof /audit | awk '{ print $2 }''
It did not like above so I tried to escape the single parenthesis at the end.
dsh -w server1 'lsof /audit | awk '{ print $2 }\''
It then hung so I changed up the parenthesis to this. This worked.
dsh -w server1... (6 Replies)
Discussion started by: cokedude
6 Replies
2. Shell Programming and Scripting
I want to run commands inside a bash script.
An example is
I want to pass the command in a string as regexp as an argument to the script, then run sed on the bash variable
sed.sh regexp
sed.sh "-i \"s/<p>//g\""
then call
sed "$regexp" $fl (3 Replies)
Discussion started by: Kangol
3 Replies
3. Shell Programming and Scripting
Hi,
I would like to run following code in bash inside a zsh script. (In this case is output unfortunately very different if you run it in zsh).
I tried to put "bash" in front of the code but I obtained following error message "bash: do: No such file or directory
" eve though I merged the whole... (7 Replies)
Discussion started by: kamcamonty
7 Replies
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
There's a JavaScript file that I call from command line (there's a framework) like so:
./RunDiag.js param1:'string one here' param2:'string two here'
I have a shell script where I invoke the above command. I can run it in a script as simple as this
#!/bin/bash
stuff="./RunDiag.js... (4 Replies)
Discussion started by: AcerAspirant
4 Replies
6. Shell Programming and Scripting
#!/bin/bash
#...
for i in `ls -c1 /usr/share/applications`
do
name="cat $i | grep ^Name= | cut -d = -f2"
echo $name
#...
done
Now inside name as output is present:
while i want only the result of the command.
Ideally i would like obtain that information using only bash ... or... (8 Replies)
Discussion started by: alexscript
8 Replies
7. UNIX for Dummies Questions & Answers
I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing
set
you can also use them "on the command line when running a script..." and it lists this in a small table:
set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I'm trying to write a bash script that will query the current system time (OS X 10.6.6) and then convert the output from HH:MM:SS into time in seconds. The output of the system time command (systemsetup -gettime) is returned as:
Time: HH:MM:SS
so I wanted to use awk -F: to grab... (5 Replies)
Discussion started by: xaiu
5 Replies
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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