I am trying to remove or replace various extraneous characters from a file so that subsequent processes work correctly. The characters that is giving me trouble is the apostrophe '.
The command I 'm trying is
sed 's/\'//g' ${IN_WRK_DIR}/file1 > ${IN_WRK_DIR}/file2
in a Korn script on HP... (8 Replies)
Hi,
I am using the KSH shell. I am facing a problem of escaping apostrophe('), that is occuring in a variable.
I used the following command, but in vain
item=`echo $item|sed 's/'/\'/g'`
this code replaces the occurance of ' in an xml file to apostrophe(') symbol.
The output of... (2 Replies)
hello,
I have a simple awk script thus:
egrep populateNode logfile.txt | gawk '{print $11}'
This gives me a list of usernames.
I want to pipe the above command into another command that will surround each username with an SQL insert statement:
insert into thetable (username) values... (3 Replies)
Hi Friends,
I need a sed or awk based script to replace a character(alphabet) with ' (Apostrophe). I tried to use the following two commands
1) sed -e 's/a/'/' filename
2) awk '{sub("a","'",$1);print}' filename
but both got failed.
Any help on this.
Thanks in advance.. (3 Replies)
I've got:
$string =~ s/(\w+)/\u\L$1/g;
Which capitalizes each word in the string. The problem is if I have a string with an apostrophe the first letter after it gets capitalized as well.
So Bob's becomes Bob'S.
Thanks for any quick fixes! (4 Replies)
I'm coding using BASH and have a requirement to replace apostrophes with backslash apostrophes. For example below:
I am here 'in my room' ok
Would be changed to:
I am here /'in my room/' ok
The original text is coming from a field in a MySql database and is being used by another process that... (5 Replies)
Hi,
I have a document with usual English text and some of the words have apostrophes (e.g. don't, can't, etc.)
I would like all these apostrophes to be doubled (e.g. don''t, can''t, etc.), but the problem is, that some of such words have double apostrophe and
by using sed -i "s/'/''/g"... (2 Replies)
Hi all ,
I'm new to unix
I have a checked project , there exists a file called xxx.config .
now my task is to find all the files in the checked out project which references to this xxx.config file.
how do i use grep or find command . (2 Replies)
Hi All,
For example, I have some words like these:
cabinet's
school's
field's
you'll
I know how to remove apostrophe from these words using this command:
cat filename | tr -s "\'" ' '
But I am not sure how I can remove the letter followed by the apostrophe, so that my output... (3 Replies)
Hello,
I have never ever seen below notation for string substitution.
sed -i -e 's/tttt/pppp'/g /var/bin/czech.sh;
The strange thing for me is the position of the apostrophe. Should it be before the / or after the g?
If I had been writing that command line, I would have chosen below way:... (3 Replies)
Discussion started by: baris35
3 Replies
LEARN ABOUT REDHAT
zgrep
ZGREP(1) General Commands Manual ZGREP(1)NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep is used to invoke the grep on compress'ed or gzip'ed files. All options specified are passed directly to grep. If no file is speci-
fied, then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and
fed to grep.
If zgrep is invoked as zegrep or zfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, zgrep uses
it as the grep program to be invoked. For example:
for sh: GREP=fgrep zgrep string files
for csh: (setenv GREP fgrep; zgrep string files)
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), egrep(1), fgrep(1), zdiff(1), zmore(1), znew(1), zforce(1), gzip(1), gzexe(1)ZGREP(1)