What I am doing is running ps and search for any connection that is over a specified number, I set it to "1" for testing I want to send an email when any of them are over 50 I want them all in one email
Below is the code what I want is to display the output of ps and grepping for "httpd" to a single email what it does now is sends an email for each one
Code:
#!/bin
Hi all
I am trying to write a simple script to make it easy download the Triple J feature album, incorporating rtmpdump and pacpl.
Code:
#!/bin/bash
echo "Directory: "
read directory
cd $directory
echo "xml:"
read xml
grep "rtmp" $xml | tr "[ ]" "[\n]" | grep "rtmp" | sed "s/url=//g" >> .rtmp
for line in
Hi all
I am trying to write a simple script to make it easy download the Triple J feature album, incorporating rtmpdump and pacpl.
Code:
#!/bin/bash
echo "Directory: "
read directory
cd $directory
echo "xml:"
read xml
grep "rtmp" $xml | tr "[ ]" "[\n]" | grep "rtmp" | sed "s/url=//g" >> .rtmp
for line in
Greetings.
I have a script that purges files from a folder and I would like a record (log file) of what files were purged.
I wrote the following snippet and it works when executing it from the command line:
Code:
LOGFILE="/path/to/logfiles/purge-folder.log"
echo "`date +%Y-%m-%d_%H:%M:%S` - Script started." >> ${LOGFILE}
for file in "/path/to/folder/*.txt&quo
Hi,
i m trying to create script which logic is like below.
Hi,
I have create a unix prog file to validate data and send out an email. Below is the command used to send out email in the program. But it is not triggering the email.
I have a script that is inventorying (not sure if thats a word) my environment.
It goes out and pulls Hostname OS, IP, and ENV (dev, prod, etc)..then spits all that to a logfile
At the top of my script i have a check to see if the logfile exist.
Hi,
I have a .sh file, to email a report of our backups from a linux machine.
Hi
I have a file which I am reading line by line and processing it.
But the last line is not getting read in the file loop until I put an enter in the end.
Code:
#!/bin/ksh -p
v_org_id=${P1}
FILE=${P2}
NEW_FILE_NAME=$APPLPTMP/b1.txt
BAKIFS=$IFS
IFS=$'\n'
exec 0<"$FILE"
echo "File to be processed.....: ${FILE}"
while read -r line
do
v_initial=`echo "$line&qu