10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to execute the cli.sh script in another shell script passing arguments and getting the below error.
Myscript.sh
#!/bin/sh
/home/runAJobCli/cli.sh runAJobCli -n $Taskname -t $Tasktype
I am passing the below 2 arguments and it giving error
./Myscript.sh T_SAMPLE_TEST MTT... (11 Replies)
Discussion started by: Info_Geek
11 Replies
2. Shell Programming and Scripting
Hi guyz, i m new to UNIX (ksh) shell scripting. while running simple code i m getting error.
read opt1
read opt2
if && ]; then
echo "Yes"
fi
while running i m getting the below error.
0
YES
./ifelse.ksh: ' missing
./ifelse.ksh: 0: not found
./ifelse.ksh: 0: not found
... (4 Replies)
Discussion started by: Jonty Immortal
4 Replies
3. Shell Programming and Scripting
Im writing an expect program to connect to cisco routers and run commands.
my commands file has only two entries
show version
show running-config
when I run the script, the first command is run without a problem.
The second command isn't.
The "s" is missing at the device command line,... (1 Reply)
Discussion started by: popeye
1 Replies
4. Shell Programming and Scripting
I am trying to send a file from my 9000 box to a vendor using sftp and I am getting this error: Couldn't close file: Failure
Here are the results of my automated script:
Connected to yyy.com.
sftp> pwd
Remote working directory: /
sftp> cd xxxxx/yyyyy_TEST/TEST
sftp> put FILE FILETEST... (1 Reply)
Discussion started by: nickg
1 Replies
5. UNIX for Dummies Questions & Answers
So, I was bored on the train today, and was thinking of ways to loop through elements of an array. I came up with the following simple script, but it doesn't work as brace expansion doesn't seem to work with variables. Is there something I'm missing, or does the shell just not work like this?
... (4 Replies)
Discussion started by: DeCoTwc
4 Replies
6. Programming
can someone provide an example, where if the parent process quits for any reason, then the child process will also close? (3 Replies)
Discussion started by: omega666
3 Replies
7. Shell Programming and Scripting
Hi,
I am attempting to test the input value for an integer. And if the value is not an integer, the intent is to complain about it and exit. Only if I can get past the syntax error, life will be full.
# test input to be a number
+$'; ] && { echo "Invalid input; Enter an integer..."; exit 2; }... (7 Replies)
Discussion started by: IETF
7 Replies
8. Shell Programming and Scripting
There is a file as:
....... some text
timing () {
capacitance : 9.0;
incap : 0.8;
cell_fall () {
values ("8.9","7.8");
}
}
........ some more text
#######
Is there a way to directly find closing brace "{" of timing () block "{" ? (2 Replies)
Discussion started by: nehashine
2 Replies
9. UNIX for Dummies Questions & Answers
I'm in the habit of using the following type of loop structure:
for num in `seq $1 $2`
do
command
doneWhile `seq $1 $2` is not exactly a huge resource hog, I would like to learn a better way. It seems that brace expansion is a good way to go:
for num in {3..10}The problem, though, is... (2 Replies)
Discussion started by: treesloth
2 Replies
10. Shell Programming and Scripting
I have a script that takes an option for server pools to run the script against. The option is given as a comma separated list (ie, -p 201,204,301).
I'm using eval and brace expansion to get those pool numbers into an array. It works fine unless only 1 pool number is given. Here's the code:
... (5 Replies)
Discussion started by: mglenney
5 Replies