03-13-2020
Hi sea,
Will crontab works can you write one example where it will run only in between 6am to 00 daily
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
I want to create a script that polls every hour a directory for the existence of a file. The file I look for is a `token` dropped by an external process at the completion of a successful FTP process. I wrote this script `checkfile.ksh`:
#!/usr/bin/ksh
if ] then
mailx... (5 Replies)
Discussion started by: alan
5 Replies
2. Shell Programming and Scripting
Hi,
i am getting following syntax error ...kingly advice why is it coming ??
#!/bin/bash
find . -name "common.log"
if ; then
echo "1"
fi
Himnashu@home /bin
$ ./a.sh
./a.sh: line 7: syntax error near unexpected token `fi'
./a.sh: line 7: `fi' (9 Replies)
Discussion started by: himvat
9 Replies
3. Shell Programming and Scripting
Hi all,
Am very new to Unix and am currently Involved in Migrating some Shell Scripts from AIX 4 to Solaris 10.
While using teh for loop am getting the below error:
$ echo $SHELL
/usr/bin/ksh
$ for file in $(ls *SEBE*)
syntax error: `$' unexpected
while the same works without issue on... (4 Replies)
Discussion started by: paragkhanore
4 Replies
4. Shell Programming and Scripting
So I am trying to convert my bash script into ksh, and this is what I have in the file so far:
#!/bin/ksh
login()
{
if
then
sendcmd BETA
else
sendcmd "$(xxd -c 32 -g 0 ${ZETA_ZETA} | awk '{print $2}')"
fi
}
But when I run it:
$ ./test.sh ... (1 Reply)
Discussion started by: guitarscn
1 Replies
5. Shell Programming and Scripting
Issue resolved, thanks (6 Replies)
Discussion started by: dangell82
6 Replies
6. Shell Programming and Scripting
unzip file.zip
if ] ; then
echo "Success"
else
echo "Some failure."
fi ;
I tried many time to detect the unzip error, but it keep show the syntax error wherever how I change the syntac. Hope someone can help me fix the issue, thanks.
Please use code tags next time for your code and... (5 Replies)
Discussion started by: duncanyy
5 Replies
7. Shell Programming and Scripting
I have written this in my script but while running i am getting syntax error `(' unexpected.
unload to "$BACKUP_DIR/n_fac_fid-$clliname" select * from n_fac_fid where fac_accesskey in (select fac_accesskey From n_fac_ap_fid where ap_clli="$clliname");
Any help appreciated. (3 Replies)
Discussion started by: suryanmi
3 Replies
8. UNIX for Beginners Questions & Answers
Dears,
While executing the below script im getting the error at line 30. Please let me know what changes to be done to fix this.
test.sh: line 30: syntax error near unexpected token `done'
test.sh: line 30: ` done '
#!/bin/sh
# Rev. PA1
# author: eillops
# date: 26-04-2018
#
#... (1 Reply)
Discussion started by: Kamesh G
1 Replies
9. Shell Programming and Scripting
I am getting this error Syntax error: `]' unexpected. Did I do something wrong with elif? Does ksh not like double brackets?
if ]; then
#echo hi
source ~/.bashrc;
elif ]; then
#echo hi
source ~/.kshrc;
fi (5 Replies)
Discussion started by: cokedude
5 Replies
10. Shell Programming and Scripting
I've been trying to figure this issue for almost 2 hours now...
I dont see/find any typos or other code mismatches.. but maybe i'm looking at the wrong places....
Here's the console output:
$ LC_ALL=C
$ cd prjs/SWARM/ ; time source ./rc
bash: cd: prjs/SWARM/: No such file or directory... (3 Replies)
Discussion started by: sea
3 Replies
LEARN ABOUT NETBSD
crontab
CRONTAB(1) BSD General Commands Manual CRONTAB(1)
NAME
crontab -- maintain crontab files for individual users (ISC Cron V4.1)
SYNOPSIS
crontab [-u user]
crontab [-elr]
DESCRIPTION
crontab is the program used to install, deinstall, or list the tables used to drive the cron(8) daemon in ISC Cron. Each user can have their
own crontab, and though these are files in /var/cron, they are not intended to be edited directly.
If the /var/cron/allow file exists, then you must be listed therein in order to be allowed to use this command. If the /var/cron/allow file
does not exist but the /var/cron/deny file does exist, then you must not be listed in the /var/cron/deny file in order to use this command.
If neither of these files exists, depending on the compiled in settings, only the super user will be allowed to use this command, or everyone
will be allowed to use this command. On NetBSD everyone is allowed to use this command.
The default maximum size for a crontab is 256 kilobytes, but this may be changed for all users on the system by putting the desired maximum
size (in bytes) in the /var/cron/maxtabsize file.
If the -u option is given, it specifies the name of the user whose crontab is to be tweaked. If this option is not given, crontab examines
``your'' crontab, i.e., the crontab of the person executing the command. Note that su(1) can confuse crontab and that if you are running
inside of su(1) you should always use the -u option for safety's sake.
The first form of this command is used to install a new crontab from some named file or standard input if the pseudo-filename ``-'' is given.
The -l option causes the current crontab to be displayed on standard output.
The -r option causes the current crontab to be removed.
The -e option is used to edit the current crontab using the editor specified by the VISUAL or EDITOR environment variables. After you exit
from the editor, the modified crontab will be installed automatically.
FILES
/var/cron/allow Optional list of users that are allowed to use crontab.
/var/cron/deny Optional list of users that are disallowed to use crontab.
/var/cron/maxtabsize Maximum size of crontab files. Defaults to 256 kilobytes.
/var/cron/tabs/ Directory containing the individual user crontab files, named after the user.
DIAGNOSTICS
A fairly informative usage message appears if you run it with a bad command line.
SEE ALSO
crontab(5), cron(8)
STANDARDS
The crontab command conforms to IEEE Std 1003.2 (``POSIX.2''). This new command syntax differs from previous versions of Vixie Cron, as well
as from the classic Version 3 AT&T UNIX syntax.
AUTHORS
Paul Vixie <vixie@isc.org>
BSD
May 6, 2010 BSD