Execution Problem with Cron


 
Thread Tools Search this Thread
Operating Systems AIX Execution Problem with Cron
# 1  
Old 04-29-2011
Execution Problem with Cron

Guys,

I am beginer in unix. There is a cobol file with fixed-width. I want to read the total Line, Word and character count. I have tried with wc-l unix command, but it returns '0'.

Please advice me the correct command/steps to get the record count.

Thanks in advance.
# 2  
Old 04-29-2011
Code:
cat <file> | wc -l

Code:
cat <file> | wc -c

Code:
cat <file> | wc -w

# 3  
Old 05-03-2011
Thanks mshilling.

I have tried with above commonds. But it is not working.
Can anybody have the idea of my above mentioned problem.
# 4  
Old 05-03-2011
Is this a Cobol database file? There is every chance that the WC command will not find any EOL characters to count!

Try the
Code:
file

command to see exactly what type of file you are dealing with.
# 5  
Old 05-03-2011
The title to your posting is "Execution Problems with Cron", and yet your posting contained nothing about "cron" or "crontab". Instead you only referred to problems with "wc".

If you have a problem with "wc" and an "Execution Problem with Cron", I suggest you solve your "wc" problem first, outside of "cron" (i.e. from the command line), then once that's solved, go on to whatever problem you are having with "Cron".
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Execution problem with Cron

Hi, I'm unable to understand why the grep command in cronjob works intermittently Expected output: Grep command to look for a particular string with today's date and exit from infinite while loop else it must sleep for 5 mins I'm using the following statement in my shell script, the... (9 Replies)
Discussion started by: charlie87
9 Replies

2. Shell Programming and Scripting

Execution problem with CRON job

HI, I have written an executable file in unix and I was able to execute it successfully but when I called this file with cron job it was giving error like "permission denied" and "No such file or directory". Please help in how cron calls the file and what permission is required on the file... (2 Replies)
Discussion started by: vipin kumar rai
2 Replies

3. UNIX for Dummies Questions & Answers

Execution problem with Cron: Script works manually but not w/Cron. Why?

Hello gurus, I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup is shown below: #!/bin/ksh db2... (3 Replies)
Discussion started by: okonita
3 Replies

4. UNIX for Dummies Questions & Answers

Execution Problems with Cron

Good evening, ive got this cron to be run: if i run this manually it doesnt work,it takes me to the prompt again /export/app/CO/opge/scr/Informe_parametros_colombia.ksh >/dev/null 2>&1 here is the code fragment: coopge@coopge: opge PRODUCCION>more... (1 Reply)
Discussion started by: alexcol
1 Replies

5. Shell Programming and Scripting

Execution problems with cron

I am new to creating crontab file , i just wrote below (40 19 * 3 * /root/maths/practisecron.sh), the script just prints "Hi". When ever i save the above file i am getting this . # crontab -e crontab: installing new crontab Can you please check where it went wrong.. (1 Reply)
Discussion started by: vkiyv05
1 Replies

6. Shell Programming and Scripting

problem with sleep cmd in execution of cron...

I am scheduling a task at regular intervals at seconds acuracy using crond and sleep command . my data in crontab file is as below:- the above line is working fine when we are creating this crontab file before 00:05 min . But when we are creating the crontab file at 00:05min , unable to... (10 Replies)
Discussion started by: manoj424
10 Replies

7. UNIX for Dummies Questions & Answers

Execution Problems with Cron

Hi friends, today i created a cron job , registered the crontab file associated but dont know why the cron is not getting executed at the right time.?? content of Crontab file : 21 15 * * * /subrat/myt i wanted to execute the script myt on 15:21 PM of everyday. the script myt... (2 Replies)
Discussion started by: paras.oriental
2 Replies

8. Shell Programming and Scripting

Execution Problems with Cron

Hi, I have written a shell script to transfer files to a SFTP server passing the filername, source and dest directory as parameters and it runs well. :) I want to schedule this script to run periodically using a cron job. root@pingu # cat /etc/crontab SHELL=/bin/bash... (1 Reply)
Discussion started by: chetancrsp18
1 Replies

9. Solaris

Solaris 10.5 perl and cron job execution problem

Hi, I want to run a crontab job on solaris 10.5. I have configured the crontab accordingly 10 * * * * /scripts/dbalter.pl >> /scripts/cronout.txt However this does not work .Then I go to /var/mail/root and find an error in the output: From root@myserver Wed Feb 4 17:02:00 2009... (1 Reply)
Discussion started by: sonu2die4
1 Replies

10. Solaris

cron execution

Hi, Here is the code snippet when executing on the command line it does execute smoothly, but while i place this on cron it doesnt run. Can anybody suggest where the problem in cron is.? #!/usr/bin/ksh home_dir="/export/home/scripts/MonitorScripts" ThresholdLimit=5 touch... (6 Replies)
Discussion started by: rameek20
6 Replies
Login or Register to Ask a Question