Advertisement

05.15.2008 at 12:04PM PDT, ID: 23406333
[x]
Attachment Details

Bash script and Cron

Asked by TSRich01 in Linux Programming, Linux Administration

Tags: Linux Bash

I have a bash script that I wrote.  It works fine when I execute it from the shell.  However, when I run the script via Cron it is not giving me the correct information.  My curiosity is that I use things like > filename to put stuff in new files.  Is there a way to make this work correctly?Start Free Trial
1:
2:
3:
4:
pg_dump -i -U postgres -h 10.1.0.100 dstest -t event_log > elog
and
gawk -F"\t" '{ print $1, $2,"\t" $3 }' efile1 >efile2
cat efile2 |grep -v -i "POFF" > efile3
[+][-]05.15.2008 at 01:00PM PDT, ID: 21577437

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Linux Programming, Linux Administration
Tags: Linux Bash
Sign Up Now!
Solution Provided By: amit_g
Participating Experts: 3
Solution Grade: A
 
 
[+][-]05.15.2008 at 01:03PM PDT, ID: 21577472

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05.15.2008 at 02:36PM PDT, ID: 21578190

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628