Thank you for your response, but it just didnt work for me again. the spaces are still at the end of each line.
Please, for future reference, "it just didnt work", is an unhelpful response. If you don't provide any feedback, it's unlikely that people will be able to help you out. What operating system and shell are you using? Exactly what command did you run? Did it generate an error message? Was there any output?
If I had to guess, you are expecting sed to modify the file when what sed does is read the file and write the changes its made to standard output, not to the original file itself. If that guess is correct, the following should work (back up your file first, just in case, or work with a copy of it):
If that didn't work, are you sure that those are spaces and not some other blank character? You can verify using hd/hexdump/od. If you don't understand the output of those commands, simply paste them here. Don't forget to use code tags for code and data (to preserve formatting).
Please, for future reference, "it just didnt work", is an unhelpful response. If you don't provide any feedback, it's unlikely that people will be able to help you out. What operating system and shell are you using? Exactly what command did you run? Did it generate an error message? Was there any output?
If I had to guess, you are expecting sed to modify the file when what sed does is read the file and write the changes its made to standard output, not to the original file itself. If that guess is correct, the following should work (back up your file first, just in case, or work with a copy of it):
If that didn't work, are you sure that those are spaces and not some other blank character? You can verify using hd/hexdump/od. If you don't understand the output of those commands, simply paste them here. Don't forget to use code tags for code and data (to preserve formatting).
Regards,
Alister
When I created a .txt file whit words and spaces and then used
it removed all spaces at the end of each line
but when I apply this to my file its not working. when I used the command
I got this: word1[space]
A
word2[space]
A
...and so on
but it supposed to be: word1A
word2A...
I suppose there's something wrong with this file. I merged 2 txt files and created one I want to remove spaces there now
there are no error messages, I always get an output file, but with no result
I didnt get it how can I verify whether there are some other blank characters
cant explain you better, sorry,I am a noob with poor eng.
---------- Post updated at 08:56 PM ---------- Previous update was at 08:25 PM ----------
I changed encoding of the whole document to ISO 8859-15 and performed
and it finally worked
Thank You again for your responses
Hi, suppose I have the following data:
albert music=top40 age=20
bob music=punk rock age=25
candy music=r n b age=22
dave music=mozart or bach only age=30
I want to extract and manipulate the music column but it's got spaces in it. How can I substitute the space with an underscore... (2 Replies)
Hi friends,
I have a file1.txt
1 | a | 4757634 | jund jdkj | erhyj
2 | a | 4757634 | jnd jdkj | rhje hjrhwj
i have used tr -d '\040' to remove the spcaes
output file
cat file1.txt | tr -d '\040'
1|a|4757634|jundjdkj|erhyj... (5 Replies)
hiii i have a file that contains spaces in the begining of a file till the middle the from there the txt would appear. hw can i remove those spaces and bring the text to the begining portion
file1
text starts from here (12 Replies)
Hi,
I have files like below, In files coming as spaces. Before transfering those files into ftp server. I want to remove the spaces and then can transfer the files into unix server.
e.g: filenames are
1) SHmail _profile001_20120908.txt
2) SHmail_profile001 _20120908.txt
3) sh... (3 Replies)
Hi Experts,
In a file tht i copied from the web , i am not able to remove the leading white spaces. I tried the below , none of them working . I opened the file through vi to check for the special characters if any , but no such characters found.
Your advice will be greatly appreciated.
sed... (5 Replies)
Hi All,
I have a comma seperated file.
I wanna remove the spaces from column 2. I mean i don't wanna remove the spaces those are presnt in column 1.
ex:
emp name, emp no, salary
abc k, abc 11, 1000 00
bhk s, bhk 22, 2000 00
the output should be:
emp name, emp no, salary
abc k, abc11,... (4 Replies)
Hi All,
I need to modify a script to remove spaces from a csv file.
The csv file is delimited by the '~' character and I need to remove the spaces which appear before this character.
i.e
Sample input:
LQ001 SWAT 11767727 ~9104 ~001 ~NIRSWA TEST 18 ~2 ~Standard Test ~0011
Desired... (5 Replies)
I have a file with only one field something like this :
213.45
220.65
240.47
345.67
320.45
I want to remove all spaces in between. Is there any unix command for that ?Thanks in advance.. (2 Replies)
Hi,
I have a file like this
(ADD_MONTHS((Substr(Trim(BOTH FROM Translate(Maximum(closeDa
------------------------------------------------------------
2007-06-30 00:00:00
I have a requirement where i need just the date.
When i do: tail -1... (2 Replies)