Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sed command in a shell script 3

Status
Not open for further replies.

aidanmoro

Programmer
Mar 7, 2006
3
0
0
IE

I have a shell script which contains the following command

sed '1,10d' Car_Loan.txt > tmp

which copies eveything except the first 10 lines of Car_Loan.txt to tmp.

When I run the shell script from a cronjob this command does not work. I know this type of issue has been discussed on the forum before, can anyone verify why this happens

thanks in advance
 

Main issue in crontab is that you need to provide FULL path to files -- inside script also/or change (cd) to desired directory. [3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
provide FULL pathnames to BOTH of your files.

vlad
+----------------------------+
| #include<disclaimer.h> |
+----------------------------+
 
..and/or provide a valid PATH variable by exporting it early within the script.

Alan Bennett said:
I don't mind people who aren't what they seem. I just wish they'd make their mind up.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top