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
2. Shell Programming and Scripting
I've got this output:
# cat test2.txt
if I just use cat test2.txt | tr "," "\n" I'll end up very near to what I'm trying to achieve:
But how can i eventually add the term... (1 Reply)
Discussion started by: nms
3. UNIX for Dummies Questions & Answers
Hi... I can't find my little red AWK book and it's been a long while since I've awk'd. But I need to take a CSV file and convert the first word of the fifth field to its own field by replacing a space with a comma.
This is for importing a spreadsheet of issues into JIRA...
a line... (9 Replies)
Discussion started by: Tawpie
4. Shell Programming and Scripting
How can we remove the comma from the end of each line.
I have a csv file in below format.
Name,age,gender,location (4 Replies)
Discussion started by: Litu19
5. Shell Programming and Scripting
I have a file with dates as
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. Shell Programming and Scripting
how to Remove comma as last charector in end of last line of file:
output file :
bbbbbb, (6 Replies)
Discussion started by: RahulJoshi
7. Shell Programming and Scripting
3/11 to nyc
3/12 41764 ecomm
3/13 hxcsxsa 2/1
Po1 VPC trunk to xl3-i
Po2 ***DO NOT ENABLE**
Po13 *** VPC link to
Po102 xl3-2lyg1accsgh-fe... (7 Replies)
Discussion started by: sumguy
8. UNIX for Dummies Questions & Answers
I have this sample file (actual file is larger) and i need to add comma at the end of every line.
TIA - jak (2 Replies)
Discussion started by: jakSun8
9. Shell Programming and Scripting
I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed).
AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC
MY * A02 RESALE 6990788000 Y... (3 Replies)
Discussion started by: udelalv
10. UNIX for Advanced & Expert Users
Hi i would like to add line numbers to end of each line in a file.
I am able to do it in the front of each line using sed, but not able to add at the end of the file.
Can anyone suggest
The following code adds line number to start of each line
sed = filename | sed 'N;s/\n/\t/'
how can i... (5 Replies)
Discussion started by: rudoraj