Tagged Questions
1
vote
4answers
397 views
How to rename files with sed and csv
I'm new with Linux, sed, and awk but I don't mind challenging myself on new ideas. That being said, I understand the purpose and how to use rename and sed for a common event such as adding a $date or ...
2
votes
3answers
1k views
Extracting column from comma separated text
I have a long comma-separated delimited file with 20K lines. Here's a sample:
"","id","number1","number2","number3","number4","number5","number6","number7"
...
7
votes
5answers
2k views
Remove comma between the quotes only in a comma delimited file
I have a input file delimited with commas (,). There are some fields enclosed in double quotes that are having a comma in them. Here is the sample row
123,"ABC, DEV 23",345,534.202,NAME
I need to ...
2
votes
1answer
853 views
Swap two columns in a CSV using SED
I have a CSV file that contains 10 different fields (, is the deliminator). Example data:
student-id,last,first,hwk1,hwk2,hwk3,exam1,hwk4,hwk5,exam2
pts-avail,,,100,150,100,200,150,100,300
...
4
votes
6answers
2k views
How can I convert tab delimited data to comma delimited data?
I'm requesting a list of ec2 snapshots via amazon's ec2 command line tool:
ec2-describe-snapshots -H --hide-tags > snapshots.csv
The data looks something like this:
SnapshotId VolumeId ...
10
votes
4answers
10k views
How to manipulate a CSV file with sed or awk?
How can I do the following to a CSV file using sed or awk?
Delete a column
Duplicate a column
Move a column
I have a big table with over 200 rows, and I'm not that familiar with sed.
2
votes
4answers
2k views
How can I find and replace with a new line?
I have a CSV delimited by commas and I want to delimit it by newlines instead.
Input:
a, b, c
Output:
a
b
c
I've written Java parsers that do this stuff, but couldn't this be done with vim or ...