08-26-2009
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Anybody know what's wrong with this syntax?
awk -v job="$job" 'BEGIN { FS="|"}
{print $1,$2," ",$4," ",$3\n,$5,"\n"}' list
It's keeping give me this message:
awk: syntax error near line 1
awk: bailing out near line 1
It seems awk has problem with my BEGIN command.
Any... (8 Replies)
Discussion started by: whatisthis
8 Replies
2. UNIX for Dummies Questions & Answers
Does anybody know how to print a variable passed to awk command?
awk -F"|" 'BEGIN {print $job,"\n","Question \n"} {print $1,$2$4," ",$3}' "job=$job1" file1
I am trying to pass job the variable job1.
the output is blank.
?? (3 Replies)
Discussion started by: whatisthis
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a unix script which can accept n number of parameters .
I can get the parameter count using the following command and assign it to a variable
file_count=$#
Is there a similar command through which i can assign a variable all the values that i have passed as a parameter
... (2 Replies)
Discussion started by: samit_9999
2 Replies
4. Shell Programming and Scripting
hi unix guru's..................:confused:
question is posted in the #3 permalink shown below. (3 Replies)
Discussion started by: yahoo!
3 Replies
5. UNIX for Advanced & Expert Users
Hi,
I am facing a challenge in fixing an issue in my installation scripts.Here is a situation:
There are 3 files which are invoked at a below given order:
Installer.ksh----->Installer.xml(Ant script)------->common.ksh
I am outputting a message from common.ksh at a terminal, after that trying to... (3 Replies)
Discussion started by: baig_1988
3 Replies
6. Shell Programming and Scripting
Hi everybody,
Currently, I have a script which access a remote computer via SSH, go to a folder already defined in the code and then executes a program in it, just like that:
ssh user@host << EOI
cd path
./file
EOI
It executes fine, but now I want to pass an argument in the command... (2 Replies)
Discussion started by: lgb3
2 Replies
7. Shell Programming and Scripting
I am having difficulties with the fllowing script:
!/bin/sh
voicemaildir=/var/spool/asterisk/voicemail/$1/$2/INBOX/
echo `date` ':' $voicemaildir >> /var/log/voicemail-notify.log
for audiofile in `ls $voicemaildir/*.wav`; do
transcriptfile=${audiofile/wav/transcript}
... (4 Replies)
Discussion started by: ghurty
4 Replies
8. Shell Programming and Scripting
I have a script.
#!/bin/sh
cur_$1_modify_time=Hello
echo "cur_$1_modify_time"
When I run like
sh /root/script1 jj
I expect value "Hello" being assigned to variable "cur_jj_modify_time" and output being "Hello" ie echoing $cur_jj_modify_time
But the output comes as
# sh... (3 Replies)
Discussion started by: anil510
3 Replies
9. Shell Programming and Scripting
Hello,
I am writing a script which is not giving the desired result. When I check the content of the 'InputFile_009_0.sh', it shows following with missing Index in this command
sed -i "s/L1ITMBLT.root/L1ITMBLT_"".root/g" run_DttfFromCombinedPrimitives_cfg.py
of .
Any help?
... (13 Replies)
Discussion started by: emily
13 Replies
10. Shell Programming and Scripting
In the bash below the variable date displays in the echo. However when I use it in the for loop it does not. Basically, the user inputs a date then that date is converted to the desired format of (month-day-year, no leading 0). That input is used in the for loop to return every file that matches... (5 Replies)
Discussion started by: cmccabe
5 Replies