10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All
I have created a file in /etc/cron.daily on redhat linux 7.3 version host
called applicationscript
cat applictaionscript
#!/bin/bash
/prod/data/routine.sh
cat /prod/data/routine.sh
#!/bin/bash
#details
regular=/prod/data/jboss/logs
backup=/prod/data/logs
#echo "Moving logs"... (3 Replies)
Discussion started by: anil529
3 Replies
2. Shell Programming and Scripting
solaris 5.10 Generic_138888-03 sun4v sparc SUNW,Sun-Fire-T200
I need a sed command that tests true when presented with lines that contain either forward and backslash.
input file:
c:/myFile.txt
c:\yourFile.txt
It doesn't appear that sed (in my environment anyway) supports... (4 Replies)
Discussion started by: msutfin
4 Replies
3. Shell Programming and Scripting
Hi gang, I have the following code inside a the file script.sh
#!/bin/bash
todaysdate=$(date --date='7 day' +'%d')
todaysmonth=$(date +'%m')
todaysyear=$(date +'%Y')
yahoodatestring=$todaysyear$todaysmonth$todaysdate
nicedate=$(date --date='5 day' +'%A')
nice="$nicedate,... (2 Replies)
Discussion started by: phpchick
2 Replies
4. Shell Programming and Scripting
Hi All,
I am working on nawk script, has the small function which prints the output on the screen.Am trying to print/append the same output in a file.
Basically nawk script should print the output on the console/screen and as well it should write/append the same result to a file.
script :... (3 Replies)
Discussion started by: Optimus81
3 Replies
5. UNIX for Dummies Questions & Answers
Dear *nix users.
I'm on Mac OS 10.6 / Terminal and try to use crontab to schedule two scripts every 30 minutes and every 41 minutes.
I followed the man instructions and created / installed a crontab file for the current user:crontab -e
with the following content
*/30 * * * *... (4 Replies)
Discussion started by: moxnos
4 Replies
6. Shell Programming and Scripting
Hi ,
i need to reboot a server during 2nd and 4th saturday every month. i have come up with the below cron
30 17 8-14 * * if ; then /rebootscript; fi # to reboot every second saturday
30 17 22-28 * * if ; then /rebootscript; fi # to reboot every fourth saturday
I am wondering why it... (3 Replies)
Discussion started by: chidori
3 Replies
7. AIX
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)
Discussion started by: samsungsamsung
3 Replies
8. Shell Programming and Scripting
Hey there,
I just stumbled upon a difference between using awk on the commandline and using it in a shellscript.
I have a variable, e.g.: PROG=vim
then i want to check if the package with this name is installed: TEMPVAL=$(dpkg -l | awk '{ if ($2 == "$PROG") print $2 }') (Im using... (10 Replies)
Discussion started by: MrSnail
10 Replies
9. Shell Programming and Scripting
Hi,
Is there a way to determine if a Script is called from a
CRON job or from a commandline
Gerry. (2 Replies)
Discussion started by: jerryMcguire
2 Replies
10. Shell Programming and Scripting
i have a script that uses an ant build.xml and its targets to pull a project from a cvs server, attempt to build the project, and then email me the results. When I run the script (either @ CLI or as a cron job) while I am logged in, everything works fine. However, if the script is set up to run... (5 Replies)
Discussion started by: kingfinny
5 Replies