10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello All,
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
6 Replies
2. Shell Programming and Scripting
(2 Replies)
Discussion started by: snoman1
2 Replies
3. UNIX for Dummies Questions & Answers
Hi guys,
Does anyone know how to remove the last character in each of the line?
This is what I have:
ABCDE.1
GLSJD.2
HIJPL.2
HKAGB.3
IUBWQ.1
What I want (remove the dot and number):
ABCDE
GLSJD
HIJPL
HKAGB
IUBWQ
I tried to use this: sed 's/.*//'
But I'm not sure if that is... (3 Replies)
Discussion started by: narachaid
3 Replies
4. Shell Programming and Scripting
Hi,
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.
*ELSET, ELSET=WHEEL_TD2
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
2 Replies
5. Shell Programming and Scripting
hello!
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
5 Replies
6. UNIX for Dummies Questions & Answers
hi,
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
2 Replies
7. HP-UX
Hi Experts,
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.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
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
2 Replies
9. UNIX for Advanced & Expert Users
Hi,
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
7 Replies
10. UNIX for Advanced & Expert Users
Hi All,
Can the cut command have double character delimiter?
If yes, how can we use it.
if my data file contains :
apple || mango || grapes
i used
cut -f1 -d"||" filename
but got an error.
Plz help....
Thanks. (1 Reply)
Discussion started by: AshishK
1 Replies