cron woes - line too long ??


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting cron woes - line too long ??
# 1  
Old 04-29-2011
cron woes - line too long ??

Here is my cron entry:
Code:
13 10 * * * /home/my_login/mystf/myscriptsize.sh > /home/my_login/mystf/`date +"%Y%m%d"`log.csv

Here is my cron error:
Code:
unexpected EOF while looking for matching ``'

...cron executes:
Code:
/home/my_login/mystf/myscriptsize.sh > /home/my_login/mystf/`date +"

..and NOT this:
Code:
/home/my_login/mystf/myscriptsize.sh > /home/my_login/mystf/`date +"%Y%m%d"`savvol.csv

Why is cron truncating the command line?

Thanks,
-dog

Last edited by Yogesh Sawant; 05-01-2011 at 06:46 AM.. Reason: added code tags
# 2  
Old 04-29-2011
'man crontab' yields:
Code:
     Only the first line (up to a `%' or end of line) of the com-
     mand  field  is  executed by the shell. Other lines are made
     available to the command as standard input. Any  blank  line
     or  line  beginning  with  a  `#'  is  a comment and will be
     ignored.

Escape '%' with '\' in crontab...
This User Gave Thanks to vgersh99 For This Post:
# 3  
Old 04-29-2011
I should substitute "man" for "google" I suppose.
Thanks!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Vi editor Line too Long Error

My file is 13 mb but it has big long lines. i tried in vain vi -R filename I tried in vainbash: vim: command not found SunOS mymac 5.10 Generic_150400-26 sun4v sparc sun4vCan you please suggest? (1 Reply)
Discussion started by: mohtashims
1 Replies

2. Shell Programming and Scripting

help-ksh as cronjob, line too long

Hello all, i need to get a script running which checks for powersupply problems of attached storages. I was faced with problems running this script in a terminal session, obviously the procued outupt is to long, but the problem could be solved with 'stty columns 120'. but I can't use this... (15 Replies)
Discussion started by: themroc
15 Replies

3. Solaris

Line too long error Replace string with new line line character

I get a file which has all its content in a single row. The file contains xml data containing 3000 records, but all in a single row, making it difficult for Unix to Process the file. I decided to insert a new line character at all occurrences of a particular string in this file (say replacing... (4 Replies)
Discussion started by: ducati
4 Replies

4. Shell Programming and Scripting

sed and Output line too long

hello i try this command in console mode sed -e :a -e '/$/N; s/\(\)\n/\1 /; ta' test.txt > result.txt i have in the output screen "Output line too long" for multiples lines can you please tell me how can i retrieve those long lines during the execution ? Another thing very... (5 Replies)
Discussion started by: ade05fr
5 Replies

5. UNIX for Dummies Questions & Answers

vi : Line too Long Error

Hi ! I am woking on Solaris 5.10 and face a problem sometimes when i try to open files in the vi editor . Sometime when the file is big i am not able to view the file in vi and i get the error like I guess vi have some line size setting and if the lines are ,longer than that... (4 Replies)
Discussion started by: Paarth
4 Replies

6. UNIX for Dummies Questions & Answers

grep long line

I am trying to get the count of a word from an xml using the below command grep "search word" -c test.xml The result is only 1, because my xml contains only one line (hule line- several thousand characters). I guess grep command will process for only 128 characters for each line. ... (7 Replies)
Discussion started by: venky23
7 Replies

7. Shell Programming and Scripting

substituting a long line in a file

Hi Guys How can i change the required information in a file at once below is the line required to change / || $6 ~ /^2294/ && $7 ~ /^2299/ ] change to / && $7 ~ /^23/ || $7 ~ /^22923/ ] (4 Replies)
Discussion started by: neyo
4 Replies

8. UNIX for Dummies Questions & Answers

vi.....line too long

I'm getting a "line too long" error when I try to vi a particular file. I really just need to view the contents as I don't have to change anything. Any suggestions?? I already tried to cat but it didnt work........:( (7 Replies)
Discussion started by: shorty
7 Replies

9. Shell Programming and Scripting

line too long using awk or sed or tr

Goodmorning, I have MKS Toolkit (K-Shell) running on a windows server. On it I have a c program that in a true unix environment works fine, but here it adds an extra '0000000000000016000A' in various places in the file that the c program produces that I need to remove. Here is what the file... (3 Replies)
Discussion started by: philplasma
3 Replies

10. Shell Programming and Scripting

search a long line

Hey all, I need to retrieve something from a line, say <TEST><A>123</A><B>456</B><ID>1111</ID><C>789</C><D>000</D></TEST><TEST><A>123</A><B>456</B><ID>2222</ID><C>789</C><D>000</D></TEST> I need to match <ID>111</ID>, so I want to retrieve <ID>1111</ID><C>789</C><D>000</D></TEST> is... (14 Replies)
Discussion started by: mpang_
14 Replies
Login or Register to Ask a Question