I would like to get some kind of notification when a script has been executed.
Note that this could be a problematic proposition because once the script has been run the file is there. How do you set apart the file that has already been there from the first run from the file to be created by the second run, hmm?
Quote:
Originally Posted by drew77
but I get
This is most probably because zip doesn't write to a file named Ubuntu_Documents.zip". Perhaps your zip-file has some other name (i suppose, from the commandline, "test.zip") and you would have to reflect this name in the cp-command.
Furthermore, are you sure you want to name the file "whatever.txt"?? A file ending in .txt is supposed to be plainly readable text and .zip-files aren't exactly that.
I am trying to create a new file(string) with todays date in a backup folder
string= `date '+%d%m%y'`
find * * * /home/SMB-2000/* -print |cpio -ovm > /home/bkups/$string
After excecuting I get the messege
# ./b2 ... (3 Replies)
Hi,
I has created the shell script in HP_UX 11.23 and using the command, echo $(date +%Y%m%d%H%M%S) > $DIR/alert, placing the time of running the script into a file alert.
I want to compare the time in the above file alert with the current time.If difference is more than 5 min, then print the... (7 Replies)
Dear all
I would like to capture who executed a script to a script's variable (i.e. testing.sh), so I can save it to a log file.
testing.sh
#! bin/ksh
user=`<< code here >>` // get the info below in RED color
<<main logic>>
echo "$user execute testing.sh on `date`" >> testing.log
... (2 Replies)
hi
i am reading a directory, and reading those files one by one
i need to write some of file contents to a new file ,for this i need to create a new file for each file
please tell me how to create new file in shell script
thanks
Satya (4 Replies)
Hi,
I want to create a file from within a script that checks whether the file itself exists or not. Like:
if ] then
echo Creating file...
cat << EOF > .theFile
echo This line should be in the file
EOF
fi
If I run the script with no condition (commenting... (2 Replies)
Hi
Script not getting executed via cron but executes successfully when executed manually. Please assist
cbspsap01(appuser) /app/scripts > cat restart.sh
#!/bin/ksh
cd /app/bin
date >>logfile.out
echo "Restart has been started....." >>logfile.out
date >>logfile.out
initfnsw -y restart... (3 Replies)
Hi to all,
I got this content/pattern from file http.log.20110808.gz
mail1 httpd: Account Notice: close igchung@abc.com 2011/8/7 7:37:36 0:00:03 0 0 1
mail1 httpd: Account Information: login sastria9@abc.com proxy sid=gFp4DLm5HnU
mail1 httpd: Account Notice: close sastria9@abc.com... (16 Replies)
Hi,
I am having a shell script which has a while loop as shown below.
while
do
sleep 60
done
I am executing this script from Informatica ETL tool command task from where we can execute UNIX commands/scripts. When i do that, i am seeing 2 processes getting started for one script... (2 Replies)
I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
Hi All,
I have written a programme where i need to work in one session but when that session get executed it doesnt execute other programme till I write exit. Below is the script
#!/bin/bash
echo 'Going to start'
exectrusteduser.com sh.com
cd /UAT_Logs/CDCI_LOGS/SEEDADM
pwd
echo... (6 Replies)