I have a csv file that I am trying to edit. I need to remove any comma that is touching a letter. I used this command to find them.
Code:
grep [a-z], moz_places_good.csv | head -n 10 | grep [a-z],
I would think I could use some form of this to just delete the commas and not the letter before it. Just not sure what kind of case statements I need.
Code:
sed 's/[a-z],//g' moz_places_good.csv > moz_places_good1.csv
Here are a few examples.
Code:
102660,"http://tinypic.com/images/404.gif","404.gif (GIF Image, 160x120 pixels)","moc.cipynit.",2,0,0,,20,1314761594939440,"BLHwEA5KNQrg"
104636,"http://en.wikipedia.org/wiki/Comparison_of_archive_formats","Comparison of archive formats - Wikipedia, the free encyclopedia","gro.aidepikiw.ne.",1,0,0,74,20,1299406155891077,"KpXR1unNI5-h"
104638,"http://en.wikipedia.org/wiki/List_of_archive_formats","List of archive formats - Wikipedia, the free encyclopedia","gro.aidepikiw.ne.",1,0,0,74,20,1299406111608099,"sDF5BkctvTeI"
104799,"http://en.wikipedia.org/wiki/EverBank_Field","EverBank Field - Wikipedia, the free encyclopedia","gro.aidepikiw.ne.",2,0,0,74,20,1309321478508918,"yxJjCMpKsXhr"
Code:
102660,"http://tinypic.com/images/404.gif","404.gif (GIF Image 160x120 pixels)","moc.cipynit.",2,0,0,,20,1314761594939440,"BLHwEA5KNQrg"
104636,"http://en.wikipedia.org/wiki/Comparison_of_archive_formats","Comparison of archive formats - Wikipedia the free encyclopedia","gro.aidepikiw.ne.",1,0,0,74,20,1299406155891077,"KpXR1unNI5-h"
104638,"http://en.wikipedia.org/wiki/List_of_archive_formats","List of archive formats - Wikipedia the free encyclopedia","gro.aidepikiw.ne.",1,0,0,74,20,1299406111608099,"sDF5BkctvTeI"
104799,"http://en.wikipedia.org/wiki/EverBank_Field","EverBank Field - Wikipedia the free encyclopedia","gro.aidepikiw.ne.",2,0,0,74,20,1309321478508918,"yxJjCMpKsXhr"
Hey guys,
I am very much new to shell scripts. So you ppl may feel that i am asking stupid question here. :D
1. I am using command line argument as an input variable. The user gets this value in his mail from client which has commas n spaces (Eg. 12,34,56,789) and the scripts... (5 Replies)
Hi,
Newbie here. I have a file that consists of data that I want to convert to a csv file. For example:
Jul 20 2008 1111 / visit home / BlackBerry8830/4.2.2 Profile/MIDP-2.0 Configuration/CLOC-1.1 VendorID/105
Jul 21 2008 22222 / add friend / BlackBerry8830/4.2.2 Profile/MIDP-2.0... (3 Replies)
Hello everyone I'm new here and this is my first post so first of all I want to say that this is a great forum and I have managed to found most of my answers in these forums : )
So with that I ask you my first question:
I have an excel file which I saved as a csv. However the excel file... (3 Replies)
Hi
Description of input file I have:
-------------------------
1) CSV with double quotes for string fields.
2) Some string fields have Comma as part of field value.
3) Have Duplicate lines
4) Have 200 columns/fields
5) File size is more than 10GB
Description of output file I need:... (4 Replies)
Hi ,
I have a file with below records
965382,10310858,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
767010,10217614,3,10217616,10217622,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,... (4 Replies)
i have data as below
123,"paul phiri",paul@yahoo.com,"po.box 23, BT","Eco Bank,Blantyre,Malawi"
i need an output to be
123,"paul phiri",paul@yahoo.com,"po.box 23 BT","Eco Bank Blantyre Malawi" (5 Replies)
In the attached file I am trying to remove all the "" and , (quotes and commas) from $2 and $3 and the "" (quotes) from $4.
I tried the below as a start:
awk -F"|" '{gsub(/\,/,X,$2)} 1' OFS="\t" enhancer.txt > comma.txt
Thank you :). (6 Replies)
Hello everyone, I have a dataset that looks something like:
1 3
2 2
3 4,5
4 3:9
5 5,9
6 5:6
I need to remove the rows that contain a comma in the second column and I'm not sure how to go about this. Here is an attempt.
awk 'BEGIN {FS=" "} { if ($2!==,) print }'Any help is appreciated. (5 Replies)
how to remove unwanted commas from a .csv file
Input file format
"Server1","server-PRI-Windows","PRI-VC01","Microsoft Windows Server 2012, (64-bit)","Powered On","1,696.12","server-GEN-SFCHT2-VMS-R013,server-GEN-SFCHT2-VMS-R031,server-GEN-SFCHT2-VMS-R023"... (5 Replies)
Discussion started by: ranjancom2000
5 Replies
LEARN ABOUT DEBIAN
image::exiftool::quicktime
Image::ExifTool::QuickTime(3pm) User Contributed Perl Documentation Image::ExifTool::QuickTime(3pm)NAME
Image::ExifTool::QuickTime - Read QuickTime and MP4 meta information
SYNOPSIS
This module is used by Image::ExifTool
DESCRIPTION
This module contains routines required by Image::ExifTool to extract information from QuickTime and MP4 video, and M4A audio files.
AUTHOR
Copyright 2003-2011, Phil Harvey (phil at owl.phy.queensu.ca)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
REFERENCES
<http://developer.apple.com/mac/library/documentation/QuickTime/QTFF/QTFFChap1/qtff1.html>
http://search.cpan.org/dist/MP4-Info-1.04/ <http://search.cpan.org/dist/MP4-Info-1.04/>
http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt <http://www.geocities.com/xhelmboyx/quicktime/formats/mp4-layout.txt>
<http://wiki.multimedia.cx/index.php?title=Apple_QuickTime>
http://atomicparsley.sourceforge.net/mpeg-4files.html <http://atomicparsley.sourceforge.net/mpeg-4files.html>
<http://wiki.multimedia.cx/index.php?title=QuickTime_container>
<http://code.google.com/p/mp4v2/wiki/iTunesMetadata>
<http://www.canieti.com.mx/assets/files/1011/IEC_100_1384_DC.pdf>
<http://www.adobe.com/devnet/flv/pdf/video_file_format_spec_v10.pdf>
SEE ALSO
"QuickTime Tags" in Image::ExifTool::TagNames, Image::ExifTool(3pm)perl v5.12.4 2011-04-14 Image::ExifTool::QuickTime(3pm)