10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
match_max 500000
set timeout 30
set outcome1 {}
set outcome2 {}
set inputfile C:\\Users\\Administrator\\Desktop\\inputfile.txt
send -i $con "\r";
expect -i $con "Desktop>" {
exp_send "type $inputfile \r"
}
set timeout 30
expect {
"Desktop>" { set outcome $expect_out(0,string);}... (3 Replies)
Discussion started by: cityprince143
3 Replies
2. Shell Programming and Scripting
Hello All,
I'm writing a Bash Script and in it I execute a piped command within a Function I wrote and I can't seem to redirect the
stderr from the 1st pipe to stdout..?
I'm setting the output to an Array "COMMAND_OUTPUT" and splitting on newlines using this --> "( $(...) )". By putting... (6 Replies)
Discussion started by: mrm5102
6 Replies
3. Shell Programming and Scripting
Hi, I'm new to korn and having trouble capturing the text output from one program in an array that I can then feed into another program. Direct approaches didn't work, so I've tried to break it down thus:
The program lonlat2pixline gives the values I need in the second column, so I print that... (4 Replies)
Discussion started by: daurin
4 Replies
4. Shell Programming and Scripting
Hello,
I unfortunately have a process that does two things, it returns an answer to me and then does a bunch of work that I would like to wait on. Here is a simple example:
#!/bin/bash
function p_w {
echo "poopy"
sleep 10
echo "scoop"
}
foo=$(p_w &)
sleep 1
echo "1... (7 Replies)
Discussion started by: brsett
7 Replies
5. Shell Programming and Scripting
Greetings,
I need to capture the output of a Sybase stored procedure, inside my
shell script( k shell). Based on this output, I need to call another
perl script, with input arguments as the result set of the procedure
execution. I need to keep looping through and call the perl script, ... (2 Replies)
Discussion started by: rajpreetsidhu
2 Replies
6. Shell Programming and Scripting
Hi all, I'd like to capture the output from the 'top' command to monitor my CPU and Mem utilisation.Currently my command isecho date
`top -b -n1 | grep -e Cpu -e Mem` I get the output in 3 separate lines.Tue Feb 24 15:00:03
Cpu(s): 3.4% us, 8.5% sy .. ..
Mem: 1011480k total, 226928k used, ....... (4 Replies)
Discussion started by: new2ss
4 Replies
7. Shell Programming and Scripting
Hi,
I'm new to ksh - unix platform. I'm writing a small script which will search my current directory and will search for file names which it takes input from the users.
Here is the code I'm having.
1 #!/bin/ksh
2 echo "enter a file name to be searched in the current dir : "
3 read... (1 Reply)
Discussion started by: avik
1 Replies
8. UNIX for Dummies Questions & Answers
Hi
I have a C++ program that generates a lot of log information on the console, I need this output (printed using printf function) to go to a file since I will use crontab to schedule the job.
I know I can do this:
myprog > myfile
but I don't know how to enter this in crontab.
I use... (3 Replies)
Discussion started by: GMMike
3 Replies
9. Shell Programming and Scripting
I have the following line in my script:
$sftpcmd $rmthost <<COMMANDS>> $sftplog 2>&1
For some reason this is not capturing the errors from sftp, they go to the file attached to the cron entry
ie
mm hh dd MM * /myscript > cron.out
any idea why?
digital unix 4.0d (6 Replies)
Discussion started by: MizzGail
6 Replies
10. Programming
A few years ago I took a C programming class and used both Linux and FreeBSD as my operating systems and gcc as the compiler. I ran a Command-line utility to to capture what happened as I ran the code, the output was saved to a file that I specified when I ran the utility command (that I can't... (1 Reply)
Discussion started by: Christopher
1 Replies