10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have several line in a text file. for example
I like apple;
I like apple
I like orange;
Output: I like apple
I try to useif grep -q "!\;$"; then (Not work)
Please use CODE tags when displaying sample input, sample output, and code segments (as required by forum rules). (1 Reply)
Discussion started by: cmdcmd
1 Replies
2. Shell Programming and Scripting
Hi,
How can we remove the comma from the end of each line.
I have a csv file in below format.
file.csv
Name,age,gender,location,
Joel,18,M,Newyork,
Monoj,21,M,Japan,
Litu,23,M,turki,
Expected o/p
file1.csv
Name,age,gender,location (4 Replies)
Discussion started by: Litu19
4 Replies
3. Shell Programming and Scripting
I have a file with dates as
'2013-01-01'
'2013-01-02'
I want the output to be '2013-01-01','2013-01-02'
if there is only 1 entry then there should not be any comma. (6 Replies)
Discussion started by: ATWC
6 Replies
4. Shell Programming and Scripting
how to Remove comma as last charector in end of last line of file:
example:
input file
---------------
aaaaaa,
bbbbbb,
cccc,
12345,
____________
output file :
-----------
aaaaaa,
bbbbbb, (6 Replies)
Discussion started by: RahulJoshi
6 Replies
5. Shell Programming and Scripting
Example data
Gi1/10
Gi1/12 xl32lytscb07
3/11 to nyc
3/12 41764 ecomm
3/13 hxcsxsa 2/1
3/14 ziim570-rsvd
3/15 xl3NDSADM
Po1 VPC trunk to xl3-i
Po2 ***DO NOT ENABLE**
Po13 *** VPC link to
Po101
Po102 xl3-2lyg1accsgh-fe... (7 Replies)
Discussion started by: sumguy
7 Replies
6. UNIX for Dummies Questions & Answers
Hi all,
I have this sample file (actual file is larger) and i need to add comma at the end of every line.
1234
4335
232345
1212
3535
Output
1234,
4335,
232345,
1212,
3535,
TIA - jak (2 Replies)
Discussion started by: jakSun8
2 Replies
7. Shell Programming and Scripting
Hi folks,
Using shell, I am trying the append comma to every line of text.
the requirement is like, I have to open the txt file in unix and read line by line and should add comma at the end of every word to make it single line
txt file
-------
abc@gmail.com
bcd@gmail.com... (7 Replies)
Discussion started by: giridhar276
7 Replies
8. Shell Programming and Scripting
Hello friends,
I have a file which consists of many rows, I use a couple of commands to convert it so i can use in a database query for filtering. I need the first columns (msisdns) in a row, seperated with commas,
9855162267,4,5,2010-11-03 17:02:07.627
9594567938f,5,5,2010-11-02... (9 Replies)
Discussion started by: EAGL€
9 Replies
9. Shell Programming and Scripting
Hi
i had String like
UID: ABC345QWE678GFK345SA90, LENGTH 32
when I used awk ' FS, {print $1}' prints
ABC345QWE678GFK345SA90,
how can i getrid of that coma at the end of the string.
Thanks in advance.. (14 Replies)
Discussion started by: Reddy482
14 Replies
10. Shell Programming and Scripting
hello
A small shell scripting help..
I have a file say with 5 lines of text (text file).
At the end of everyline I need to add a comma at the end of the file.
Thanks, ST2000 (4 Replies)
Discussion started by: ST2000
4 Replies