When running the following sed command from the command line I am able to
remove all entries with #username from the file and redirect to another file.
When I use the same command in the following script I end up with the original
entries in the namesonly file. ie nothing has been removed.
Is there an error with this command or something else causing the problem?
How do we delete all carriage returns after a particular string using sed inside a K Shell?
e.g. I have a text file named file1 below:
$ more file1
Group#=1 User=A
Role=a1
Group#=2 User=B
Role=a1
Role=b1
Group#=3 User=C
Role=b1
I want the carriage returns to be delete on the... (12 Replies)
HI All,
Have some files which contains some string like,
"create .<table1> as"
"insert into .<table2> values",
i want to replace ".<table1>" with only "<table1>", i.e removing '.' character in ksh, i have written below code but it is not removing the dot character, any help?
for name... (2 Replies)
Hi,
I have a file with the text below. How do i remove the character "%" from the text file using sed ? Can anybody help ?
0%
68%
72%
0%
54%
33%
75%
24%
6%
59%
77%
77%
33% (6 Replies)
Hello,
I have a file Test.txt with 9 columns that looks like this:
1g12 A 14 19 2OAY A 326 331 AAAASA
1l7v A 68 73 1l7v A 68 73 AALAIS
1l7v A 68 73 1XVW B 72 77 AALAIS
1l7v A 68 73 1XXU A 65 70 AALAIS
1l7v A 68 73 1XXU B 65 70 AALAIS
1l7v A 68 73 1XXU C 65 70 AALAIS
1l7v A 68 73 1XXU D... (4 Replies)
I have a source text file that contains something like this:
<start_template>
bool function( void *<var_name> )
{
// Blah Blah
}
</start_template>
Following is used to remove this template from source file.
template=$(sed -n -e '/<start_template>/,/<\/start_template>/{... (4 Replies)
Is there an easy way in sed to remove a character and values
after that character?
ex:
blackout_10-11-2011(NODE_LEVEL)
I want to remove '(' and everything after. so I will only have.
blackout_10-11-2011
I can use a cut command to do this but interested in seeing how its done... (1 Reply)
I am trying to use the sed command to remove any character that is passed as a parameter to the script. I may want to replace any character in the file (-, =, $, space). I'm running into an issue when passing the $.
This is a typical row in the file.
"000000B553","--INTERNAL USE... (6 Replies)
I have a file and I want to remove quotes from the word " ` " through sed command but unable to remove
I am using below command
sed s/"`XYZ`"/"ZXY"/g file1.txt > file2.txt
But this is not working. How can we remove "`" through sed command (2 Replies)
I would like produce
blue, green, red, yellowfrom"blue:,*green:,*red:,*yellowI can remove the colon with
echo "blue:,*green:,*red:,*yellow" | sed 's/://g'which givesblue,*green,*red,*yellowbut when I try
echo "blue:,*green:,*red:,*yellow" | sed 's/://g'; 's/*//g'I get bash: s/*//g: No such... (9 Replies)