bash: command substitution: line 1: unexpected EOF while looking for matching `"'
bash: command substitution: line 2: syntax error: unexpected end of file
How do I eval a string like "awk 'BEGIN{ FS="\""}/string/ {print $0}' filename" and attach the result to a variable??
The backslash of this string creates a problem when i try
Hi,
I have a script which looks through an input file and takes data from the file to use within the script.
Everything works fine until the script reads the item \windows\directory\structure\ from the input file into a variable.
As unix sees the backslash as an escape character, the... (5 Replies)
Hi
I need the "\\hello" (without double quotes) to be written to a file.
echo "\\\\hello" >file is working under bash shell but not working under ksh shell (gives only one / in the output)
Please advise.
TIA
Prvn (4 Replies)
I have a line that contains backslashes in which I want sed to substitute text with variables.
The line;
\\s008\2033330user$
I want to change this in \\s008.ourschool.com\2033330user$
I now use this script:
USER=2033330user
sed 's/\\'"$USER"'/.ourschool.com\\'"$USER/"
This doesn't... (3 Replies)
Bit of a weird one i suppose, i want to use an echo inside an echo... For example...
i have a script that i want to use to take users input and create another script. Inside this script it creates it also needs to use echos...
echo "echo "hello"" >$file
echo "echo "goodbye"" >$file
... (3 Replies)
Hi I am getting absurd behavior of escape character in echos as followed:oinlcso003{arsadm} #: echo "\as shdd"
\as shdd
oinlcso003{arsadm} #: echo "Well, isn't that \"special\"?"
Well, isn't that "special"?
oinlcso003{arsadm} #: echo "Well, isn't that \special\?"
Well, isn't that \special\?... (3 Replies)
Hi there,
I found something very weird!
Should I report that as a bug or is it me misusing the command?
I've got a file with a backslash in its name.
I know it's a horrible policy but it's not me.
The file came from a mac computer because this is a backup server.
Anyway, when using... (8 Replies)
Hello All,
In a Bash Script I'm writing I have a section where I loop through a text file that was
outputted by another script. In the text file some of the strings in there are enclosed with
the BOLD "character sequences" (i.e. "\033But it's weird, because if I run this command:
echo -E... (12 Replies)
Let's say I have a text file called process.out that contains:
cn=long\, ann,cn=users
cn=doe\, john,cn=users
I need to have the following appended in the beginning
ldapdelete -h $OIDHOST
So the final output looks like:
ldapdelete -h $OIDHOST "cn=long\, ann,cn=users"
ldapdelete -h... (4 Replies)
Hi,
How do I input \ when I do a vi of my file ? I try to input the \ but it came out as @.
Appreciate any help. (4 Replies)
Discussion started by: snowfrost88
4 Replies
LEARN ABOUT HPUX
echo
echo(1) General Commands Manual echo(1)NAME
echo - echo (print) arguments
SYNOPSIS
[arg] ...
DESCRIPTION
writes its arguments separated by blanks and terminated by a new-line on the standard output. It also understands C-like escape conven-
tions; beware of conflicts with the shell's use of
write an alert character
backspace
print line without appending a new-line
form-feed
new-line
carriage return
tab
vertical tab
backslash
the 8-bit character whose
ASCII code is the 1-, 2-, 3- or 4-digit octal number n, whose first character must be a zero.
write an 8-bit value that is the zero-, one-, two- or three-digit octal number
num
is useful for producing diagnostics in command files and for sending known data into a pipe.
Notes
Berkeley differs from this implementation. The former does not implement the backslash escapes. However, the semantics of the escape can
be obtained by using the option. The echo command implemented as a built-in function of follows the Berkeley semantics (see csh(1)).
EXTERNAL INFLUENCES
Environment Variables
determines the interpretation of arg as single and/or multi-byte characters.
If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari-
able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization
variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
AUTHOR
was developed by OSF and HP.
SEE ALSO sh(1).
BUGS
No characters are printed after the first This is not normally a problem.
STANDARDS CONFORMANCE echo(1)