10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. 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
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
The following subroutine prints 1 instead of the content of the Equipment variable. Can someone tell me why?
#!c:/perl/bin/perl.exe
#
use strict 'vars';
my $Equipments = "data/equips.txt";
unless (open(EQUIP_FH, "$Equipments")) {
print "errors: $Equipments\n"; # This line prints... (1 Reply)
Discussion started by: tqlam
1 Replies
7. Shell Programming and Scripting
I have the following code in a csh script
I want to pass the value of the variable sigmasq to the awk script so that I can divide $0 by the value of sigmasq
grep "Rms Value" $f.log \
| awk '{ sub(/*:*\.*/,x); \
print... (2 Replies)
Discussion started by: kristinu
2 Replies
8. Shell Programming and Scripting
Hi,
Can you please help. I am scripting in sh and I am trying to simply copy one directory to another but for some reason my variables are not recognised?
echo "The latest version of the program is being found......."
cd $SOFTWARE/src/$progname
version=`ls $SOFTWARE/src/$progname | grep... (13 Replies)
Discussion started by: cyberfrog
13 Replies
9. 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
10. 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