Sponsored Content
Top Forums Shell Programming and Scripting Count number of column in a comma delimited file Post 302591388 by bhargav on Thursday 19th of January 2012 10:56:28 AM
Old 01-19-2012
echo "10620,"claim processed,paid",reported" | sed 's/$/,/'
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Comma Delimited file

I have a comma delimited file that sometimes has addresses details in. The problem is that the address detail can be seen as: "Sample House, Sample Road". When I run a script specifying the file is comma delimited I would like it to ignore comma's that are in between speech marks. Is this... (2 Replies)
Discussion started by: dbrundrett
2 Replies

2. Shell Programming and Scripting

Converting Tab delimited file to Comma delimited file in Unix

Hi, Can anyone let me know on how to convert a Tab delimited file to Comma delimited file in Unix Thanks!! (22 Replies)
Discussion started by: charan81
22 Replies

3. Shell Programming and Scripting

Insert comma based on max number of column

Hi, I am new to unix shell shell scripting. I have a specific requirement where I need to append comma's based on the max number of column in the file. Eg: If my source file look something like this, sengwa,china tom,america,northamerica smith,america walter My output file... (8 Replies)
Discussion started by: nicholas_ejn
8 Replies

4. UNIX for Dummies Questions & Answers

Comma delimited file

Hi All, I have output of sql saved in comma separated file. Now i need to read line by line this file and assign word to a unix variable for further processing Eg: Test file world, 1, 3, 4 earth,2,3,4,5 moon,1,2,3,4 Output should be word1= world word2=1 echo " first word... (7 Replies)
Discussion started by: gwrm
7 Replies

5. Shell Programming and Scripting

Find and replace a column that has '' to NULL in a comma delimited using awk or sed

Hi this is my first time posting ever. I'm relatively new in using AWK/SED, I've been trying many a solution. I'm trying to replace the 59th column in a file where if I encounter '' then I would like to replace it with the word NULL. example 0 , '' , '' , 0 , 195.538462 change it to 0... (5 Replies)
Discussion started by: gumal901
5 Replies

6. UNIX for Dummies Questions & Answers

How do you delete cells from a space delimited text file given row and column number?

How do you delete cells from a space delimited text file given row and column number? Letś say the row number is r and the column number is c. Thanks! (5 Replies)
Discussion started by: evelibertine
5 Replies

7. Shell Programming and Scripting

How to insert a sequence number column inside a pipe delimited csv file using shell scripting?

Hi All, I need a shell script which could insert a sequence number column inside a dat file(pipe delimited). I have the dat file similar to the one as shown below.. |A|B|C||D|E |F|G|H||I|J |K|L|M||N|O |P|Q|R||S|T As shown above, the column 4 is currently blank and i need to insert sequence... (5 Replies)
Discussion started by: nithins007
5 Replies

8. Shell Programming and Scripting

Print records which do not have expected number of fields in a comma delimited file

Hi, I have a comma (,) delimited file, in which few fields are enclosed with in double quotes " ". I have to print the records in the file which donot have expected number of field with the line number. File1 ==== name,desgnation,doj,project #header#... (7 Replies)
Discussion started by: machomaddy
7 Replies

9. Shell Programming and Scripting

Insert a new column with sequence number (Delimiter as comma)

Hi All, I have a file which has data like a,b c,d e,f g,h And I need to insert a new column at the begining with sequence no( 1 to n) 1,a,b 2,c,d 3,e,f 4,g,h Please let me know how to acheive this in unix (3 Replies)
Discussion started by: weknowd
3 Replies

10. UNIX for Beginners Questions & Answers

Replace a column in tab delimited file with column in other tab delimited file,based on match

Hello Everyone.. I want to replace the retail col from FileI with cstp1 col from FileP if the strpno matches in both files FileP.txt ... (2 Replies)
Discussion started by: YogeshG
2 Replies
condor_cod(1)						      General Commands Manual						     condor_cod(1)

Name
       condor_cod manage - COD machines and jobs

Synopsis
       condor_cod [-help -version]

       condor_codrequest[-pool	centralmanagerhostname[:portnumber]-name  scheddname][-addr "<a.b.c.d:port>"] [[-help -version] [-debug -timeout N
       -classad file] ] [-requirements expr] [-lease N]

       condor_codrelease-id ClaimID[[-help -version] [-debug -timeout N -classad file] ] [-fast]

       condor_codactivate-id ClaimID[[-help -version] [-debug -timeout N -classad file] ] [-keyword string -jobad  filename  -cluster  N  -proc  N
       -requirements expr]

       condor_coddeactivate-id ClaimID[[-help -version] [-debug -timeout N -classad file] ] [-fast]

       condor_codsuspend-id ClaimID[[-help -version] [-debug -timeout N -classad file] ]

       condor_codrenew-id ClaimID[[-help -version] [-debug -timeout N -classad file] ]

       condor_codresume-id ClaimID[[-help -version] [-debug -timeout N -classad file] ]

       condor_coddelegate_proxy-id ClaimID[[-help -version] [-debug -timeout N -classad file] ] [-x509proxy ProxyFile]

Description
       condor_codissues commands that manage and use COD claims on machines, given proper authorization.

       Instead of specifying an argument of request, release, activate, deactivate, suspend, renew, or resume, the user may invoke the condor_cod-
       tool by appending an underscore followed by one of these arguments. As an example, the following two commands are equivalent:

	  condor_cod  release -id "<128.105.121.21:49973>#1073352104#4"

	  condor_cod _release -id "<128.105.121.21:49973>#1073352104#4"

       To make these extended-name commands work, hard link the extended name to the condor_codexecutable. For example on a Unix machine:

       ln condor_cod _request condor_cod

       The requestargument gives a claim ID, and the other commands (release, activate, deactivate, suspend, and resume) use  the  claim  ID.  The
       claim ID is given as the last line of output for a request, and the output appears of the form:

       ID of new claim is: "<a.b.c.d:portnumber>#x#y"

       An actual example of this line of output is

       ID of new claim is: "<128.105.121.21:49973>#1073352104#4"

       Also see section 4.3for more a complete description of COD.

Options
       -help

	  Display usage information

       -version

	  Display version information

       -pool centralmanagerhostname[:portnumber]

	  Specify a pool by giving the central manager's host name and an optional port number

       -name scheddname

	  Send the command to a machine identified by scheddname

       -addr <a.b.c.d:port>

	  Send the command to a machine located at "<a.b.c.d:port>"

       -lease N

	  For the requestof a new claim, automatically release the claim after Nseconds.

       request

	  Create a new COD claim

       release

	  Relinquish a claim and kill any running job

       activate

	  Start a job on a given claim

       deactivate

	  Kill the current job, but keep the claim

       suspend

	  Suspend the job on a given claim

       renew

	  Renew the lease to the COD claim

       resume

	  Resume the job on a given claim

       delegate_proxy

	  Delegate an X509 proxy for the given claim

General Remarks
Examples
Exit Status
       condor_codwill exit with a status value of 0 (zero) upon success, and it will exit with the value 1 (one) upon failure.

Author
       Condor Team, University of Wisconsin-Madison

Copyright
       Copyright  (C)  1990-2012  Condor  Team,  Computer  Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved.
       Licensed under the Apache License, Version 2.0.

       See the Condor Version 7.8.2 Manualor http://www.condorproject.org/licensefor additional notices. condor-admin@cs.wisc.edu

								  September 2012						     condor_cod(1)
All times are GMT -4. The time now is 03:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy