Syntax error: unexpected 'else'


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Syntax error: unexpected 'else'
# 1  
Old 03-13-2020
I'm not using CRON, I have no need for it.
Please give it a try in your other thread, we'll help you from there on.

I had used it like 5 years ago - ONCE, while I was writing a script to handle cron Smilie

From what I recall, it's not THAT hard, once you get past the time code lines....
But basicly it's simple:
Code:
<command> <time code settings>

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Syntax error: Unexpected '('

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

2. Shell Programming and Scripting

Syntax error: `]' unexpected

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

3. UNIX for Beginners Questions & Answers

Syntax error near unexpected token

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

4. Shell Programming and Scripting

Syntax error `(' unexpected

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

5. Shell Programming and Scripting

Syntax error: 'fi' unexpected

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

6. Shell Programming and Scripting

Help with ksh syntax error Unexpected Fi

Issue resolved, thanks (6 Replies)
Discussion started by: dangell82
6 Replies

7. Shell Programming and Scripting

ksh syntax error: `(' unexpected

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

8. Shell Programming and Scripting

syntax error: `$' unexpected

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

9. Shell Programming and Scripting

unexpected syntax error

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

10. Shell Programming and Scripting

sh: syntax error: `...' unexpected???

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
Login or Register to Ask a Question
tcpblast(8)							     tcpblast							       tcpblast(8)

NAME
tcpblast - tool for measuring network bandwidth SYNOPSIS
tcpblast [options] destination[:port] DESCRIPTION
tcpblast/udpblast is a simple tool for probing network and estimating its throughput. By default it sends 300 blocks (1024 bytes each) of data to specified destination host. Destination can be name or address, IPv4 or IPv6. When IPv6 address is specified with port it should look like: '[3ffe:8010::1]:9' (with single quotes to prevent shell expansion of []). Options -4, --ipv4 use only ipv4 address -6, --ipv6 use only ipv6 address -a send random data -b BUF_SIZE socket buf size (default: -1, don't change), with `-' to be substracted from results -c, --count BLOCKS change default (300) number of blocks, range: 1..10000000 -d DOTFREQ print dot every DOTFREQ blocks, disables cont. speed disp. -h, --help this help -i, --delay DELAY write delay in microseconds (EXPERIMENTAL) -l, --last BLKS show also speed for last BLKS blocks -m results for every block in separate line -n, --nwrite do not write, use e.g. with chargen port -o switch from continuous speed displaying to dots printing -p PORT bind this local PORT -q --quiet show only final statistics -r, --read read data returned to us, switches default port to echo -R, --rate RATESPEC limit the speed according to the RATESPEC -s BLOCK_SIZE block size (default 1024 bytes) -t MAXTIME limit time to MAXTIME (up to 42950 h) --tcp use TCP (default) --udp use UDP (default if named udpblast) -v, --verbosity verbosity, default 0, maximum 3. -v adds time display, -vv also speed in B/s, -v - speed in b/s. -V, --version version destination host name or address port use port #/name xyz instead of default port 9 RATESPEC RATE[,TIME][:RATE[,TIME]]... RATE generating data at RATE speed in B/s TIME for TIME seconds (can be floating point number), last can be omitted and that time will be infinite Options -b, -c, -R, -s and -t can use case insensitive unit multipliers and specifiers: size (bytes): -b and -s argument without units is in bytes, can use [{k,m,g}]b (lower or upper case) for KB, MB or GB. {k,m,g} are powers of 1024. number: -c argument is just a number, can have k, m or g added (powers of 1024), no unit needed rate (bytes pes second): -R RATE is in B/s or Bps, the postfixes can be [{k,m,g}]{b/s,bps} time (seconds): -t and -R TIME argument is in seconds, can be postfixed with [{k,m,g}]{s,min,h,w,m,y} Example: tcpblast -b 4KB -c 10k -R 10kbps,2:20kbps,3s target tcpblast version: FreeBSD + rzm 20001030 BUGS
Rafal says that he is a perfectly bad and careless maintainer :) If You found any other bugs send it to him. AUTHORS
Software: dfk@nic.eu.net (Daniel Karrenberg - acc. to FreeBSD version) Maintained by: Rafal Maszkowski <rzm@icm.edu.pl> Manual page: Artur R. Czechowski <arturcz@bofh.org.pl>, Oct 1999; rzm, Oct 2000 3rd Berkeley Distribution perl 5.005, patch 03 tcpblast(8)