Im trying to pause my script for 23:59 to 6am but it is throwing error:
Code below:
Moderator's Comments:
Please wrap all code, files, input & output/errors in CODE tags.
It makes it far easier to read and preserves spaces for indenting or fixed-width data.
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)
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)
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)
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)
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)
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)
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)
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)
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 FREEBSD
time
TIME(1) BSD General Commands Manual TIME(1)NAME
time -- time command execution
SYNOPSIS
time [-al] [-h | -p] [-o file] utility [argument ...]
DESCRIPTION
The time utility executes and times the specified utility. After the utility finishes, time writes to the standard error stream, (in sec-
onds): the total time elapsed, the time used to execute the utility process and the time consumed by system overhead.
The following options are available:
-a If the -o flag is used, append to the specified file rather than overwriting it. Otherwise, this option has no effect.
-h Print times in a human friendly format. Times are printed in minutes, hours, etc. as appropriate.
-l The contents of the rusage structure are printed as well.
-o file
Write the output to file instead of stderr. If file exists and the -a flag is not specified, the file will be overwritten.
-p Makes time output POSIX.2 compliant (each time is printed on its own line).
Some shells may provide a builtin time command which is similar or identical to this utility. Consult the builtin(1) manual page.
If time receives a SIGINFO (see the status argument for stty(1)) signal, the current time the given command is running will be written to the
standard output.
ENVIRONMENT
The PATH environment variable is used to locate the requested utility if the name contains no '/' characters.
EXIT STATUS
If utility could be timed successfully, its exit status is returned. If utility terminated abnormally, a warning message is output to
stderr. If the utility was found but could not be run, the exit status is 126. If no utility could be found at all, the exit status is 127.
If time encounters any other error, the exit status is between 1 and 125 included.
SEE ALSO builtin(1), csh(1), getrusage(2), wait(2)STANDARDS
The time utility is expected to conform to ISO/IEC 9945-2:1993 (``POSIX'').
HISTORY
A time utility appeared in Version 3 AT&T UNIX.
BSD May 14, 2006 BSD