10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
OS : RHEL 6.7
Shell : bash
I am trying to remove the leading the spaces in the below file
$ cat pattern2.txt
hello1
hello2
hello3
hello4
Expected output is shown below.
$ cat pattern2.txt
hello1
hello2
hello3
hello4 (2 Replies)
Discussion started by: John K
2 Replies
2. Shell Programming and Scripting
Hi All,
The output file contains data as below.
"20141023","CUSTOMER" ,"COMPANY" ,"IN0515461" ,"" ,"JOSHUA"
There are spaces in between the ending " and ,. The number of spaces is random.
How can I remove that from the file so that the final output is:... (4 Replies)
Discussion started by: aarsh.dave
4 Replies
3. Shell Programming and Scripting
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)
Discussion started by: almonds
2 Replies
4. Shell Programming and Scripting
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)
Discussion started by: i150371485
5 Replies
5. Linux
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)
Discussion started by: anurupa777
12 Replies
6. Shell Programming and Scripting
Hi folks,
I need to remove spaces at the end of each line in a *.txt file. it looks like this
word 1
word 2
.
.
.
word n
i found some sed commands but any of them didnt work so far
thank you for your posts (6 Replies)
Discussion started by: Jimmy7
6 Replies
7. UNIX for Dummies Questions & Answers
hey,
I have this file:
ATOM 2510 HG12 VAL 160 8.462 15.861 1.637
ATOM 2511 HG13 VAL 160 9.152 14.510 0.725
ATOM 2512 CG2 VAL 160 6.506 16.579 -0.088
ATOM 2513 HG21 VAL 160 5.499 16.421 -0.478
ATOM 2514 HG22 VAL 160 6.417 16.984 ... (4 Replies)
Discussion started by: kanikasharma
4 Replies
8. Shell Programming and Scripting
I am having the data.txt file as follows.
-------
<RMService>
<ResControl>
<ResultCode>FATAL</ResultCode>
<ServiceTime>38</ServiceTime>
<DWLControl>
<requesterLanguage>100</requesterLanguage>
<requesterLocale>en</requesterLocale>
<requesterName>NCO A Batch... (6 Replies)
Discussion started by: kmanivan82
6 Replies
9. Shell Programming and Scripting
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)
Discussion started by: javeed7
4 Replies
10. Shell Programming and Scripting
Hi ,
I need to add semicolumn at the end of each line in a file.
can any one help me in this?
Thanks in advance (2 Replies)
Discussion started by: scorpio
2 Replies