10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I've got a file where each line is separated by ^M characters. I want to be able to cat the file without those lines. When I cat the file now what I see are blank lines. However, the blank lines are actually ^M characters; when I open the file with vi they show up.
No... (7 Replies)
Discussion started by: newbie2010
2. Shell Programming and Scripting
How to remove junk charecter ^M from unix file i am using sun solaris unix.
I already tried few commands
but it didnt helped me.
Any help appriciated.
Please view this code tag video for how to use code tags when posting code... (5 Replies)
Discussion started by: ripudaman.singh
3. Shell Programming and Scripting
I have a file that has data something like below:
.....and so on
I am trying to bring it in one line with comma delimited something like below :
I tried the something below in the code section:
cat File.txt | tr '\n' ',' (1 Reply)
Discussion started by: rkumar28
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.
Output should be:
I tried this but it gets rid of all of the % characters.... (5 Replies)
Discussion started by: raptor25
5. Shell Programming and Scripting
I have a file like this:
I need to remove the 1 after the . in the file name so that it reads:
Having some difficulty getting the command to work. I tried using
cut -d 26
but that just doesn't work. (3 Replies)
Discussion started by: bbbngowc
6. Shell Programming and Scripting
I have a file with the following contents in file test1.txt .
AMY_MTT_240Y001,N60_PG2_10G001,A2H_P3H_10G002,7C7_7D7_NP1,A2E_PV0_10G002,L78_PG1_64S001,A2H_P2M_NP2,LDN_YSN_64S001,WV6_WYV_64... (5 Replies)
Discussion started by: kinny
7. Shell Programming and Scripting
I am having a pipe (|) delimited file which is having ^Z character in the middle of the text.Could anyone please suggest me how to remove this ^Z Character from the file.I almost used all the ideas posted in this site but none of them worked in my case since tis ^Z character is not coming at... (4 Replies)
Discussion started by: phoenix86
8. 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
9. UNIX for Advanced & Expert Users
While writing a shell script i happen to store some value in a string. Lets say the value is 59788.
Now in this script i want to get the value 9788 removing the first charater 5. The original string length usually remains constant.
Is there a single line command to do this or any simple way to... (4 Replies)
Discussion started by: npn
10. UNIX for Dummies Questions & Answers
I am attempting to remove all the ^M characters in a file in VI.
The command I am using is
but it doesn't work, saying 'substitute pattern match failed'.
Any ideas why?
Jules (2 Replies)
Discussion started by: julesinbath