10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a expect file like this
#!/opt/tools/unsupported/expect-5.39/bin/expect
spawn ssh -l user ip
expect_after eof {exit 0}
set timeout 10
log_file /report.txt
expect "Password:" { send "pasword\r" }
expect "$ " { send "date\r" }
expect "$ " { send "readlink /somelink\r" }
set... (7 Replies)
Discussion started by: bebehnaz
7 Replies
2. UNIX for Dummies Questions & Answers
Hi Guys,
I like to output every command executed in the script to a file.
I have tried set -x which does the same.
But it is not giving the logs of the child script which is being called from my script.
Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies
3. Shell Programming and Scripting
I am looking to parse a text file output and set variables based on what is cropped from the parsing.
Below is my script I am looking to add this feature too.
All it does is scan a certain area of users directories for anyone using up more than X amount of disk space. It then writes to the... (4 Replies)
Discussion started by: es760
4 Replies
4. Shell Programming and Scripting
I am trying to make a script to take commands from a .txt file ( line by line) and pass it using send ( used in another function )
what i am trying to achieve is :
set nol "`grep '' ${exp_path2}/cmdlist.txt | wc -l `"
as in shell script
nol=`grep '' $exp_path2/cmdlist.txt | wc -l`
... (0 Replies)
Discussion started by: dixyantar
0 Replies
5. HP-UX
Hi,
I am using hp unix
i want to know the use of the following commands
set --
set - variable
thanks (4 Replies)
Discussion started by: gomathi
4 Replies
6. Shell Programming and Scripting
Apologies for the utter triviality of this question, but we all have to start somewhere! I've also tried searching but this question is pretty vague so I didn't (a) really know what to search for or (b) get many relevant hits to what I did search for.
Anyway, I'm in the process of self-teaching... (1 Reply)
Discussion started by: u5j84
1 Replies
7. Shell Programming and Scripting
I'm hoping you guys can help me out here. I've been trying different methods to try and get what IW as hoping would be a fairly simple script but has turned into a pain.
Bit of background - I am writing a script to check values in certain failes to ensure they are corerct. I'm runnign this on... (2 Replies)
Discussion started by: stuc
2 Replies
8. Shell Programming and Scripting
Hi there,
I'm using two commands that need different IFS.
The mysql command need IFS to include space because I'm given the mysql command as a variable:
supernova:~# cat myscript
IFS=' '
MYSQL="mysql -u user -ppassword database"
$MYSQL -Ne "SELECT COUNT(1), MAX(id), MAX(name) FROM terminal"... (7 Replies)
Discussion started by: chebarbudo
7 Replies
9. UNIX for Dummies Questions & Answers
I have a file which I am processing using awk to spit out the following:
export CLIENT=1 ; export USER=1 ; export METABASE=1 ; export TASK=1 ; export TOTAL=3
What i want to do now is execute that within the script so those variables are available to other commands. I've tried piping the... (3 Replies)
Discussion started by: Cranie
3 Replies
10. UNIX for Dummies Questions & Answers
I'm having an issue when I export within my program. I'm getting the variable name, not the variable value. I have a configuration file (config.txt) that has the values of the variables set as so:
set -a
export ARCHIVEPOSourceDir="/interfaces/po/log /interfaces/po/data"
export... (2 Replies)
Discussion started by: ParNone
2 Replies