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 OPENSOLARIS
echo
echo(1B) SunOS/BSD Compatibility Package Commands echo(1B)NAME
echo - echo arguments to standard output
SYNOPSIS
/usr/ucb/echo [-n] [argument]
DESCRIPTION
echo writes its arguments, separated by BLANKs and terminated by a NEWLINE, to the standard output.
echo is useful for producing diagnostics in command files and for sending known data into a pipe, and for displaying the contents of envi-
ronment variables.
For example, you can use echo to determine how many subdirectories below the root directory (/) is your current directory, as follows:
o echo your current-working-directory's full pathname
o pipe the output through tr to translate the path's embedded slash-characters into space-characters
o pipe that output through wc -w for a count of the names in your path.
example% /usr/bin/echo "echo $PWD | tr '/' ' ' | wc -w"
See tr(1) and wc(1) for their functionality.
The shells csh(1), ksh(1), and sh(1), each have an echo built-in command, which, by default, will have precedence, and will be invoked if
the user calls echo without a full pathname. /usr/ucb/echo and csh's echo() have an -n option, but do not understand back-slashed escape
characters. sh's echo(), ksh's echo(), and /usr/bin/echo, on the other hand, understand the black-slashed escape characters, and ksh's
echo() also understands a as the audible bell character; however, these commands do not have an -n option.
OPTIONS -n Do not add the NEWLINE to the output.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO csh(1), echo(1), ksh(1), sh(1), tr(1), wc(1), attributes(5)NOTES
The -n option is a transition aid for BSD applications, and may not be supported in future releases.
SunOS 5.11 3 Aug 1994 echo(1B)