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
Hi all,
Please help me to remove first and last character of each line in a file.
Thanks,
Baski (5 Replies)
Discussion started by: baskivs
5 Replies
4. UNIX for Dummies Questions & Answers
I need help removing the last character of every line if it is a certain character. For example I need to get rid of a % character if it is in the last position.
Input:
aaa%
%bbb
ccc
d%dd%
Output should be:
aaa
%bbb
ccc
d%dd
I tried this but it gets rid of all of the % characters.... (5 Replies)
Discussion started by: raptor25
5 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. UNIX for Dummies Questions & Answers
Hello Friends, How can I remove the last two values of this line using sed
John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638:9/3/90:45900
The result should look like this:
John Carey:507-699-5368:29 Albert way, Edmonton, AL 25638 (3 Replies)
Discussion started by: humkhn
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a Linux file which has content as sh (0 Replies)
Discussion started by: bhuvanas
0 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
I'm appending header and trailer record for a binary file using
echo "$header" > filename
cat oldfilename >> filename
echo "$trailer" >> filename
The echo is introducing newline character after header and trailer.Please let me know is there any possibility to get rid of newline character. (2 Replies)
Discussion started by: ammu
2 Replies
10. Shell Programming and Scripting
How do i determine what the end of the line character is in a text file. for eg. is it \n or \f or \t etc..
Is there a unix command for this? (5 Replies)
Discussion started by: zomboo
5 Replies