Sponsored Content
Top Forums Shell Programming and Scripting awk/sed/something else for csv file Post 302523659 by necron on Thursday 19th of May 2011 10:00:05 AM
Old 05-19-2011
Hi Birei,

Appriciated, but that would involve installing perl (not default on FreeBSD) and since awk is 'base' I'll stick to that.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Updating a line in a large csv file, with sed/awk?

I have an extremely large csv file that I need to search the second field, and upon matches update the last field... I can pull the line with awk.. but apparently you cant use awk to directly update the file? So im curious if I can use sed to do this... The good news is the field I want to... (5 Replies)
Discussion started by: trey85stang
5 Replies

2. Shell Programming and Scripting

Need help with a script to process a CSV file using SED and AWK

I get a CSV file every day with 2 columns and multiple rows ex: date1,date2 ( both the fields are varchar fields) This data has to be updated in a table which is being done manually and i want to automate that. 1. I have to select all the data from the prod table( 2 columns { date1,date2}) into... (4 Replies)
Discussion started by: kkb
4 Replies

3. Shell Programming and Scripting

Using awk/sed in handling csv file.

Please study the below script and the output Script: echo "Minimum ${host} ${process} response time=${min} ms" >> ${OUTDIR}/${OUTFILE}; echo "Maximum ${host} ${process} response time=${max} ms" >> ${OUTDIR}/${OUTFILE}; echo "Average ${host} ${process} response time=${avg} ms" >>... (0 Replies)
Discussion started by: ajincoep
0 Replies

4. Shell Programming and Scripting

Use grep sed or awk to extract string from log file and put into CSV

I'd like to copy strings from a log file and put them into a CSV. The strings could be on different line numbers, depending on size of log. Example Log File: File = foo.bat Date = 11/11/11 User = Foo Bar Size = 1024 ... CSV should look like: "foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Discussion started by: chipperuga
7 Replies

5. Shell Programming and Scripting

HELP with AWK or SED. Need to replace the commas between double quotes in CSV file

Hello experts, I need to validate a csv file which contains data like this: Sample.csv "ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0 "ABCD","I",23,0,9,,"23/12/2012","OK","Street,State, 91135",0 I just need to check if all the records contain exactly the number of... (5 Replies)
Discussion started by: shell_boy23
5 Replies

6. Shell Programming and Scripting

Converting txt file into CSV using awk or sed

Hello folks I have a txt file of information about journal articles from different fields. I need to convert this information into a format that is easier for computers to manipulate for some research that I'm doing on how articles are cited. The file has some header information and then details... (8 Replies)
Discussion started by: ksk
8 Replies

7. Shell Programming and Scripting

Replacing FQDN by hostnames in a CSV file with sed & awk

Hello, Beginning with shell scipting, I'm trying to find in a csv file, the lines where the field related to hostname is displayed as an FQDN intead the hostname. (some lines are correct) and the to correct that inside the file: Novell,11.0,UNIX Server,bscpsiws02,TxffnX1tX1HiDoyBerrzWA==... (2 Replies)
Discussion started by: Wonto
2 Replies

8. Shell Programming and Scripting

Combined sed+awk for lookup csv file

have written a combined sed+awk to perform a lookup operation which works but looking to enhance it. looking to match a record using any of the comma separated values + return selected fields from the record - including the field header. so: cat foo make,model,engine,trim,value... (6 Replies)
Discussion started by: jack.bauer
6 Replies

9. Shell Programming and Scripting

Datestamp format 2nd change in csv file (awk or sed)

I have a csv file formatted like this: 2014-08-21 18:06:26,A,B,12345,123,C,1232,26/08/14 18:07and I'm trying to change it to MM/DD/YYYY HH:MM for both occurances. I have got this: awk -F, 'NR <=1 {print;next}{"date +%d/%m/%Y\" \"%H:%m -d\""$1 "\""| getline dte;$1=dte}1' OFS="," test.csvThis... (6 Replies)
Discussion started by: say170
6 Replies

10. UNIX for Beginners Questions & Answers

awk and sed script to create one output CSV file

Hi All , I would require your help to generate one output file after post processing of one CSV file as stated below This file is just a small cut from a big file . Big file is having 20000 lines PATTERN,pat0,pat1,pat2,pat3,pat4,pat5,pat6,pat7,pat8,pat9... (2 Replies)
Discussion started by: kshitij
2 Replies
DH_PERL(1)							     Debhelper								DH_PERL(1)

NAME
       dh_perl - calculates Perl dependencies and cleans up after MakeMaker

SYNOPSIS
       dh_perl [debhelperoptions] [-d] [librarydirs...]

DESCRIPTION
       dh_perl is a debhelper program that is responsible for generating the ${perl:Depends} substitutions and adding them to substvars files.

       The program will look at Perl scripts and modules in your package, and will use this information to generate a dependency on perl or
       perlapi. The dependency will be substituted into your package's control file wherever you place the token ${perl:Depends}.

       dh_perl also cleans up empty directories that MakeMaker can generate when installing Perl modules.

OPTIONS
       -d  In some specific cases you may want to depend on perl-base rather than the full perl package. If so, you can pass the -d option to make
	   dh_perl generate a dependency on the correct base package. This is only necessary for some packages that are included in the base
	   system.

	   Note that this flag may cause no dependency on perl-base to be generated at all. perl-base is Essential, so its dependency can be left
	   out, unless a versioned dependency is needed.

       -V  By default, scripts and architecture independent modules don't depend on any specific version of perl. The -V option causes the current
	   version of the perl (or perl-base with -d) package to be specified.

       library dirs
	   If your package installs Perl modules in non-standard directories, you can make dh_perl check those directories by passing their names
	   on the command line. It will only check the vendorlib and vendorarch directories by default.

CONFORMS TO
       Debian policy, version 3.8.3

       Perl policy, version 1.20

SEE ALSO
       debhelper(7)

       This program is a part of debhelper.

AUTHOR
       Brendan O'Dea <bod@debian.org>

11.1.6ubuntu2							    2018-05-10								DH_PERL(1)
All times are GMT -4. The time now is 03:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy