10 More Discussions You Might Find Interesting
1. OS X (Apple)
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)
Discussion started by: dallas88
6 Replies
2. Shell Programming and Scripting
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)
Discussion started by: SSKAAB
10 Replies
3. UNIX for Dummies Questions & Answers
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)
Discussion started by: poga
1 Replies
4. Shell Programming and Scripting
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)
Discussion started by: the0nion
7 Replies
5. Shell Programming and Scripting
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)
Discussion started by: aix_admin_007
4 Replies
6. UNIX for Dummies Questions & Answers
#!/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)
Discussion started by: tjmannonline
1 Replies
7. Shell Programming and Scripting
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)
Discussion started by: faizlo
2 Replies
8. Shell Programming and Scripting
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)
Discussion started by: NewSolarisAdmin
6 Replies
9. UNIX for Dummies Questions & Answers
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)
Discussion started by: llsmr777
2 Replies
10. Shell Programming and Scripting
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)
Discussion started by: rony_daniel
4 Replies