i m trying the following command but its not working:
sed 's/find/\'replace\'/g' myFile
but the sed enters into new line
# sed 's/find/re\'place/g' myFile
>
I havn't any idea how to put single quote in my replace string. Your early help woud be appreciated. Thanx (2 Replies)
Hi Experts...
I am trying to find out separting the records which are staring with double quote(") and a six digit number(ex: 012456,987654,etc) from a file.
For example :
Source File :
"116462","SMITH CHEVR
"164098","SIMPS
"104498","SIMPSONVIL
"Export lments"
"Copyrts... (4 Replies)
Hi,
I search for the string below which contains a single quote,
some text '/home/myuser
in the file myfile.txt as another user with the grep command as follows
su - myuser -c "grep 'some text \'/home/myuser' myfile.txt"
I also tried using two backslashes
su - myuser... (6 Replies)
i want to replace mistaken quotes in line starting with tag 300 and relocate the quote in the correct position so the input is
223;25
224;20100428064823;1;0;0;0;0;0;0;0;8;1;3;9697;18744;;;;;;;;;;;;
300;X;Event:... (3 Replies)
Hello ,
I got html file , these file are normal html as we can see .
what i would like to do is in this html file , i want to print only string start with double quote and end with double quote by line by line.
<tr><td valign=top>25.</td><td><A... (8 Replies)
I need to check whether first character of variable is single quote.
I tried the below constructions but they are all not working (always return true)
if (test `echo "$REGEXP" |cut -c1` != "'"); then echo "TRUE"; fi
if (test `echo "$REGEXP" |cut -c1` != '\''); then echo "TRUE"; fi
if (test... (5 Replies)
Hi Froum.
I have tried in vain to find a solution for this problem - I'm trying to replace any double quotes within a quoted string with a single quote, leaving everything else as is.
I have the following data:
Before:
... (32 Replies)
Hi All ,
We have source data file as csv file and since data could contain commas ,each attribute is quoted into double quotes.However problem is that some of the attributa data also contain double quotes which is converted to double double quote while creating csv file
XLs data :
... (2 Replies)
From:
1,2,3,4,5,This is a test
6,7,8,9,0,"This, is a test"
1,9,2,8,3,"This is a ""test"""
4,7,3,1,8,""""
To:
1,2,3,4,5,This is a test
6,7,8,9,0,"This; is a test"
1,9,2,8,3,"This is a ''test''"
4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Hello,
I'd like to print line if column 5th doesn't match with exm. But to reach there I have to make sure I match single quote.
I'm struggling to match that.
I've input file like:
Warning: Variants 'exm480340' and '5:137534453:G:C' have the same position.
Warning: Variants 'exm480345'... (9 Replies)
Discussion started by: genome
9 Replies
LEARN ABOUT OSF1
echo
echo(1) General Commands Manual echo(1)NAME
echo - Writes its arguments to standard output
SYNOPSIS
echo [-n] [string...]
[Tru64 UNIX] The -n option is valid only if the environment variable CMD_ENV is set to bsd.
Note
The C shell has a built-in version of the echo command. If you are using the C shell, and want to guarantee that you are using the command
described here, you must specify the full path /usr/bin/echo. See the csh(1) reference page for a description of the built-in command.
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
echo: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
[Tru64 UNIX] No newline is added to the output. The -n option is valid only if the environment variable CMD_ENV is set to bsd. Otherwise
any -n operand is treated as a string rather than as a option. See the printf(1) reference page for use in portable applications.
OPERANDS
The string to be displayed on standard output. The echo command recognizes the following special characters in the string: Displays an
alert character. Displays a backspace character. Suppresses the newline character. All characters following c in the arguments are
ignored. Displays a formfeed character. Displays a newline character. Displays a carriage-return character. Displays a tab character.
Displays a vertical tab character. Displays a backslash character. Displays an 8-bit character whose value is the 1-, 2- or 3-digit octal
number, number. The first digit of number must be a 0 (zero).
DESCRIPTION
The echo command writes the specified string to standard output, followed by a newline character.
The arguments are separated by spaces. Use the echo command to produce diagnostic messages in command files and to send data into a pipe.
If there are no arguments, the echo command outputs a newline character.
[Tru64 UNIX] The echo command described here is the program /usr/bin/echo. Both csh and sh shells contain built-in echo subcommands,
which do not necessarily work in the same way as the /usr/bin/echo command.
EXIT STATUS
The following exit values are returned: Successful completion. An error occurred.
EXAMPLES
To write a message to standard output, enter: echo Please insert diskette . . . To display a message containing special characters as
listed in DESCRIPTION, enclose the message in quotes, as follows: echo "
I'm at lunch.
I'll be back at 1 p.m."
This skips three lines and displays the message: I'm at lunch. I'll be back at 1 p.m.
Note
You must enclose the message in quotation marks if it contains escape sequences such as
. Otherwise, the shell treats the back-
slash () as an escape character. The previous command example, entered without the quotes, results in the following output: nnnI'm
at lunch.nI'll be back at 1 p.m.
To use echo with pattern-matching characters, enter: echo The back-up files are: *.bak
This displays the message The back-up files are: and then displays the file names in the current directory ending with To add a sin-
gle line of text to a file, enter: echo Remember to set the shell search path to $PATH. >>notes
This adds the message to the end of the file notes after the shell substitutes the value of the PATH shell variable. To write a
message to the standard error output (sh only), enter: echo Error: file already exists. >&2
Use this in shell procedures to write error messages. If the >&2 is omitted, then the message is written to the standard output.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of echo: [Tru64 UNIX] This variable must set to bsd for the -n option to be
valid. Otherwise any -n operand is treated as a string member. Provides a default value for the internationalization variables that are
unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari-
ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value,
overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes
of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for-
mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of
LC_MESSAGES.
SEE ALSO
Commands: csh(1), ksh(1), printf(1), Bourne shell sh(1b), POSIX shell sh(1p)
Environment: environ(5)
Standards: standards(5)echo(1)