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
2. Shell Programming and Scripting
I want to remove the spaces from all the lines matching a particular pattern from my file. For instance in file abc.txt I have following data.
Header,This is the header
111,this is 1st record
222, this is 2nd record
333, this is 3rd record
Footer,3 records found
Footer,111222333 ... (5 Replies)
Discussion started by: decci_7
3. Shell Programming and Scripting
I have pipe separated file with lots of blank spaces.
After using sed -e 's/ *| */|/g' this command ,its giving me output as
HCAMBLAMCNB010|Jul 3 2012 11:14AM|
Bangali Mohalla |
... (5 Replies)
Discussion started by: sususa
4. Shell Programming and Scripting
I have a file with lot of blank lines, how can I remove those using awk??
Shruthi (4 Replies)
Discussion started by: shruthidwh
5. Shell Programming and Scripting
I am trying to remove all tabspaces and all blankspaces from my file using sed & awk, but not getting proper code. Please help me out.
My file is like this (<b> means one blank space, <t> means one tab space)-
$ cat file
NARESH<b><b><b>KUMAR<t><t>PRADHAN... (3 Replies)
Discussion started by: NARESH1302
6. UNIX for Dummies Questions & Answers
I have a problem where I need to append few spaces(say 10 spaces) for each line in a file whose length is say(100 chars) and others leave as it is.
I tried to find the length of each line and then if the length is say 100 chars then tried to write those lines into another file and use a sed... (17 Replies)
Discussion started by: prathima
7. Shell Programming and Scripting
I want to remove spaces from data.
1,aa ,21, 22
2,a a ,23 ,24
3, ,25 ,26
output should be:
i have to remove leading and trailing spaces.Not the space between data and also i dont want to remove the space if data is... (4 Replies)
Discussion started by: monika
8. UNIX for Dummies Questions & Answers
I'm using the command from this thread https://www.unix.com/unix-dummies-questions-answers/590-converting-list-into-line.html
to convert vertical lines to horzontal lines. But I need to remove the spaces that is created. Unfortunately I can't figure out where the space is in the code..
I... (2 Replies)
Discussion started by: lost
9. Shell Programming and Scripting
i had a problem with the unix command when i want to remove the white spaces in a string..i guess i cud do it with a sed command but i get an error when i give space in the square brackets..
string="nh hjh llk"
p=`echo $string | sed 's/ //g'`
i donno how to give space charater and... (2 Replies)
Discussion started by: sahithi_khushi
10. UNIX for Dummies Questions & Answers
I stored results like this
VAR=`wc -l < ls.txt`
But the value of the wc gave me a padded number.
How do I strip the padding from $VAR?
Do you think I could use SED?
Except instead of a file input, have a variable redirection input? (2 Replies)
Discussion started by: yongho