Hi All,
I have an expression as follows:-
a=`expr ${i} + ${j}` >> $log_file 2>&1
Here, if any of the values i or j or both happens to be empty then the "expr" returns error as
"expr: 0402-050 Syntax error." My problem is I am not able to re-direct this error to the log file. Its is getting... (4 Replies)
Ok so i have this script and I dont know how to have the output go to a file and then email that file to someone.
#!/bin/ksh
print "AL"
print "AM"
print "AN"
print "RL\n"
nawk '/PROD/ {print $3, $2}' /home/user/switch_listtest | sort -k1,2
print "End of Report"
Thank you in... (2 Replies)
I can run this from the command line:
scp -i identfile /path/file_to_send remotelogin@remotebox:/path_to_put_it/file_to_send
and I get:
file_to_send 100% |***************************************************************************| 0 00:00
but if I do:
scp -i identfile... (6 Replies)
Hi all,
I have a script which checks on my jobs that run on some cluster.
The script, "script.sh", takes as an input the job-id for the job to checked. Sometimes I have 100s of jobs and I want to check them. I could put these job-ids into a file, each id in its own line.
The script would ask... (2 Replies)
#!/bin/ksh -x
cd /tmp/tj
ftp -n servername.com << DONE
user username password
as
put test.log
quit
close
DONE
echo "testing..."
sh -x scriptname, and it shows all, but username, as, put, quit, close, DONE.
how can i see those ? (1 Reply)
Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions.
... (4 Replies)
Hi guys,
been scratching round the forums and my mountain of resources.
Maybe I havn't read deep enough
My question is not how sed edits a stream and outputs it to a file, rather something like this below:
I have a .txt with some text in it :rolleyes:
abc:123:xyz
123:abc:987... (7 Replies)
Hi, i'm trying to gather details from remote hosts and want them to be written to my local linux machine from where i'm using SSH. My command looks some thing like this
ssh -q remotehost 'bash -s' <command.txt
where command.txt is a file in my local machine containing
ps -ef |grep httpd |... (1 Reply)
Hi,
I am working on Sun Solaris 5.10 and want to direct the output from a disk space check script to an output file;
#!/bin/bash
CURRENT=$(df -k /log/logs | grep /log/logs | awk '{ print $5}' | sed 's/%//g')
THRESHOLD=30
if ; then
echo "Remaining free space is low" > output.txt
else... (10 Replies)
I'm trying to complete a bash script to capture if an external webcam is active in a video conference session. Some users will switch the camera to the built-in MAC camera. When this happens I want to trigger a set of events.
Things tried: reviewed the console.app to look for patterns on when... (6 Replies)