10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which contains the data lines like below.I want to remove the tab spaces at the end of each line.I have tried with the command sed 's/\+$//' file.but it does not work.Can anyone help me on this?
15022 15022 15022 15022 15022 15022
15023 15023 15023 15023 15023 ... (16 Replies)
Discussion started by: am24
16 Replies
2. Shell Programming and Scripting
Hi,
Searching through forum I found "sed 's/*$//'" can be used to remove trailing whitespaces and tabs from file. The command works fine but I see minor issue as below. Can you please suggest if I am doing something wrong here.
$ cat a.txt
upg_prod_test
upg_prod_new
$ cat a.txt |sed... (11 Replies)
Discussion started by: bhupinder08
11 Replies
3. Shell Programming and Scripting
Hello.
The token is any printable characters between 2 " .
The token is unknown, but we know that it is between 2 "
Tok 1 : "1234x567"
Tok 2 : "A3b6+None"
Tok 3 : "A3b6!1234=@"
The ligne is :
Line 1 :
"9876xABCDE"Do you have any code fragments or data samples in your post
Line 2 : ... (3 Replies)
Discussion started by: jcdole
3 Replies
4. Shell Programming and Scripting
Hi
I have a file which contains wrong XML, There are some garbage characters at the end of line that I want to get rid of. Example:
<request type="product" ><attributes><pair><name>q</name><value><!]></value></pair><pair><name>start</name><value>1</value></pair></attributes></request>�J ... (7 Replies)
Discussion started by: dirtyd0ggy
7 Replies
5. Shell Programming and Scripting
All:
Can somebody help me out with a sed command, which removes the the first occurance of ')' until the end of the line
If I have the following input
... (5 Replies)
Discussion started by: BeefStu
5 Replies
6. Shell Programming and Scripting
I'm sure this will be an easy question for you experts out there, but I have been searching the forum and working on this for a couple hours now and can't get it right.
I have a very messy data file that I am trying to tidy up - one of the issues is some records are split into multiple lines: ... (4 Replies)
Discussion started by: tink
4 Replies
7. Shell Programming and Scripting
I have a file with a bunch of similar lines in which I want to extract a phrase delimited by the first occurance of a '>' at the beginning and the first occurance of a '<' at the end (you might have guessed these are beginning/end of HTML tags). Using Sed I have managed to delete up to and... (7 Replies)
Discussion started by: coldcanuck
7 Replies
8. UNIX for Dummies Questions & Answers
HI i am having a file this
(sys19:pnlfct:/pfact/temp>) cat temp_sand
1234567890
1234567890
1234567890
1234567890
I want to make this file as
(sys19:pnlfct:/pfact/temp>) cat temp_sand
1456789023
1456789023
1456789023
1456789023
just take the 2nd and 3rd position and put it... (5 Replies)
Discussion started by: arunkumar_mca
5 Replies
9. Shell Programming and Scripting
Hi,
I have file as shown below.
abc,
def,
abc,
xyz,
I have to remove ',' from end of last line (xyz,). How can I do that with single command? Is it possible or I have to iterate through complete file to remove that?
- Malay (2 Replies)
Discussion started by: malaymaru
2 Replies
10. UNIX for Dummies Questions & Answers
I know this is going to be an easy anwer, but I haven't been able to figure this out - even with the help of the previous posts. I want to go from this
PROD USER anon;
to this
TEST;
I have coded a few sed commands, and none of them are getting the job done. anon will not always be the... (2 Replies)
Discussion started by: djschmitt
2 Replies