10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a file which contain below lines. The starting word of each line is call and the end line is semi colon. I need to find the character size of each line and then move it to a file. If the character size is more than 255 then I need to push that line to a next file and I need... (6 Replies)
Discussion started by: JoshvaPeter
2. Shell Programming and Scripting
Discussion started by: snoman1
3. UNIX for Dummies Questions & Answers
Does anyone know how to remove the last character in each of the line?
This is what I have:
What I want (remove the dot and number):
I tried to use this: sed 's/.*//'
But I'm not sure if that is... (3 Replies)
Discussion started by: narachaid
4. Shell Programming and Scripting
I have a file with lines such as the below. I want to remove the comma only if it is the first character on a line. I can't work out how to do this using sed.
63, 64, 65, 72, 82, 88, 89, 92, 120, 121, 152, 181, 190, 221, 252, 259
, 260, 282, 283, 285, 286,... (2 Replies)
Discussion started by: carlr
5. Shell Programming and Scripting
i'd like to ask if there's a way using sed in order to cut every character of a line after a certain character.My output looks like this:
blabla blavbla blabla # bla bla bla
and i want it to be :
blabla blavbla blabla
thanks in advance (5 Replies)
Discussion started by: vlm
6. UNIX for Dummies Questions & Answers
I want to remove first word in all files where first and second word is seperated by comma.
example: a file contains Apple,mango.
i need only mango shoule be there in the file???
Apple, should be removed!!!!!
can anyone help me out???
thanks in advance,
Arun Manas:b: (2 Replies)
Discussion started by: arunmanas
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8. Shell Programming and Scripting
Using ls input as example..
ls | sed 's/\n/ /'outputs with line breaks, where I was expecting the \n to disappear. I've tried \r as well wondering if terminal output used different breaks.
Is there a way to remove the line breaks without saving to file and then working from there?
----------... (2 Replies)
Discussion started by: davidpbrown
9. UNIX for Advanced & Expert Users
I am facing one interesting problem :
I have a file which contains data like this
459,|1998-11-047|a |b |c \n efg | d|e | \n
459,|1998-11-047|a \n c|b |c \n efg | d|e | \n
Basically what I have to do is , I have to remove all \n which is coming ( enclosed ) in between... (7 Replies)
Discussion started by: shihabvk
10. UNIX for Advanced & Expert Users
Can the cut command have double character delimiter?
If yes, how can we use it.
if my data file contains :
apple || mango || grapes
cut -f1 -d"||" filename
but got an error.
Thanks. (1 Reply)
Discussion started by: AshishK