08-07-2006
Vgresh,
It's giving me following error.
tr -d '\000' a(my file name)
tr: The combination of options and String parameters is not legal.
Usage: tr [ -c | -cds | -cs | -ds | -s ] [-A] String1 String2
tr [ -cd | -cs | -d | -s ] [-A] String1
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am writing a script to remove multiples pipes (|) from a file. It needs to look like this data|data|data
instead of data|||data||data||||data
I have found the correct sed command to do this, but I need to do it in a loop and a for loop has not worked for me. It needs to be done on... (3 Replies)
Discussion started by: TL56
3 Replies
2. Shell Programming and Scripting
Hello and thx for reading this
I'm using sed to remove only the leading spaces in a file
bash-280R# cat foofile
some text
some text
some text
some text
some text
bash-280R#
bash-280R# sed 's/^ *//' foofile > foofile.use
bash-280R# cat foofile.use
some text
some text
some text... (6 Replies)
Discussion started by: laser
6 Replies
3. Shell Programming and Scripting
I am trying to remove the ita from this file:
"1234ita","john","smith"
"56789ita","jim","thomas"
the command i am using is:
sed '/^ita/d' infile.csv > outfile.csv
it is running but doing nothing, very rarely use sed so trying to learn it any help would be appreciated (2 Replies)
Discussion started by: Pablo_beezo
2 Replies
4. Shell Programming and Scripting
Hi
Trying to remove line from file log_January_1_array and code below doesn't work.
$(sed -e '/"$n"/d' <log_January_1_array >log_January_1_array_1)
sed doesn't know what is in $n variable and nth happens.
Please advice how to make sed running this.
thx (2 Replies)
Discussion started by: presul
2 Replies
5. UNIX for Dummies Questions & Answers
Ok, so I have bunch of files that are named "orange__file_name.asm" and I want to batch rename them to "file_name.asm" I know that using "ls | sed s/orange__//" will get rid of the part of the file name I do not want. But how do I combine that with the mv command to actually do it?
Thanks
JG (5 Replies)
Discussion started by: john galt
5 Replies
6. Shell Programming and Scripting
i need to search for user belonging to group 'macusr' and the extract the user name .
i am able to write a oneliner for this using awk + sed + tr
i am using tr to chop off '()' from the output. but i want to use it in sed itself . can someone please help me with that
file contents
... (7 Replies)
Discussion started by: chidori
7 Replies
7. Shell Programming and Scripting
Hi
i need to remove all the lines staring with 'printf("\n' from a file,
example : the file tmp.txt contains
printf("\n ");
printf("\n good");
printf("\n ");
printf("\n ");
printf("");
printf(
m_sprintf(for
printf("\n ");
i have tried with following commands but... (5 Replies)
Discussion started by: mprakasheee
5 Replies
8. UNIX for Advanced & Expert Users
I have a script that I am trying to apply on files that have form feeds between pages but I am trying to replace the last form feed, with carriage return so that when I convert it to a PDF file it won't generate a blank page.
My script looks like this
sed '$ s/\^L/\^M/' invoice.txt... (12 Replies)
Discussion started by: ziggy6
12 Replies
9. Shell Programming and Scripting
I'm trying to remove the first match only of 2Z694 from an xml file and replace with a blank
File Example:
</Phoenix_Response_Data>
<Bundle_Name_Primary>2Z694</Bundle_Name_Primary>
<Bundle_Name>2Z694</Bundle_Name>
</Phoenix_Response_Data>
tried using:
sed -e 's/'2Z694'/''/1' but this... (15 Replies)
Discussion started by: cillmor
15 Replies
10. Shell Programming and Scripting
Trying to use sed to, in-place, remove specific text from a file. Since there are / in the text I use | to escape that character. Thank you :).
sed -i -e 's|xxxx://www.xxx.com/xx/xx/xxx/.*/|' /home/cmccabe/list
sed: -e expression #1, char 51: unterminated `s' command (4 Replies)
Discussion started by: cmccabe
4 Replies