Sponsored Content
Top Forums Shell Programming and Scripting Handling .CSV( Comma seperated value) in awk Post 71279 by Laud12345 on Monday 9th of May 2005 03:30:13 PM
Old 05-09-2005
Handling .CSV( Comma seperated value) in awk

Hi Guys,

I am trying to reading in comma seperated values in awk. I can set the delimiter to be a comma, but the tricky part is that commas that appear within quotes are not to be considered as delimiters. Could someone please help.

Regards,
Laud
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to load comma seperated values file (*.csv) into Oracle table

Hi all I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so... The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (5 Replies)
Discussion started by: handynas
5 Replies

2. UNIX for Advanced & Expert Users

How to load comma seperated values file (*.csv) into Oracle table

Hi all I need to input values in a .csv file into my Oracle table running in Unix, I wonder what would be the command to do so... The values are recorded in an excel file and I tried using a formatted text file to do so but failed because one of the field is simply too large to fit in the... (4 Replies)
Discussion started by: handynas
4 Replies

3. Shell Programming and Scripting

Removing blank lines from comma seperated and space seperated file.

Hi, I want to remove empty/blank lines from comma seperated and space seperated files Thanks all for help (11 Replies)
Discussion started by: pinnacle
11 Replies

4. Shell Programming and Scripting

perl help for comma seperated output

Hi, how can i make a comma seperated output summary. i attached the sample log file. I have to capture these data in the log file. Arcotid Time Stamp, Username, Success, Failure, Error Code, Error Message In the log snippet the userID can be found in- Code Arcot Native Server:... (3 Replies)
Discussion started by: namishtiwari
3 Replies

5. Shell Programming and Scripting

Script to append a value seperated by comma

I have a file like below. How can I add a new value after moss separated by a comma. This adding script should work in such a way that each time i pass a value it should be added one after the other separated by commas. hru:122: hello:123:john,philip,mary,kp,moss hi:124: bye:125: Can... (7 Replies)
Discussion started by: Tuxidow
7 Replies

6. Shell Programming and Scripting

Passing Comma seperated arguments

Hi How to takes coma seperated arguments and and parsing each argument to varaiable that has used further in the script. (1 Reply)
Discussion started by: Reddy482
1 Replies

7. Shell Programming and Scripting

Convert comma seperated file to line seperated.

Hi, I have data like this. 1,2,3,4 Output required: 1 2 3 4 I am trying to use tr function but getting error. Help is appreciated. (6 Replies)
Discussion started by: pinnacle
6 Replies

8. UNIX for Dummies Questions & Answers

Handling Comma in string values in a CSV file

Hi have a comma separated file which has numeric and string columns. String columns are quoted and can have comma in between the quotes. How to identify the columns with FS ="," sample records"prabhat,kumar",19,2000,"bangalore,India" In awk it should be$1 = prabhat,kumar $2=19 $3=2000... (9 Replies)
Discussion started by: prabhat.diwaker
9 Replies

9. Shell Programming and Scripting

awk comma seperated value within double quote

Hi, I have a data file separated by comma, data enclosed by "" head file.txt "HD","Sep 13 2016 1:05AM","0001" "DT","273093045","192534" "DT","273097637","192534" .. I want to get the 3rd column value (0001) to be assigned to my variable I tried FILE_VER=`cat file.txt | awk... (2 Replies)
Discussion started by: Prasannag87
2 Replies

10. Shell Programming and Scripting

Convert listner.log to csv format with comma seperated

Hi All, I am new to shell scripting i am trying to convert the listner.log to csv which can be inturn converted to excel for easy reading. i used this command awk '/SID=/ && /HOST=/ && /PORT=/ && /USER=/ { i=match($0,"SID="); i=i+RLENGTH; h0=substr($0,i); i=match(h0,")");... (6 Replies)
Discussion started by: skoshekay
6 Replies
diskowner(1M)															     diskowner(1M)

NAME
diskowner - retrieve the owner of a storage device SYNOPSIS
path DESCRIPTION
The command is used to retrieve the subsystem, if any, which is using the specified path. The command is intended to help prevent users from overwriting storage that is already in use. The command will print out the owner of the path, or if no owner was found. A storage device is considered owned by a subsystem if it has been formatted by that subsystem. For example, if a disk contains a VxFS filesystem, but is not mounted or in use, it is still considered owned by the VxFS subsystem. If the path specified is invalid or inaccessible, an error message will be printed. Options and Arguments The command recognizes the following options and arguments: path The path name to the storage device. The path may be a symbolic link, as long as it points to a storage device, such as a file, disk, or logical volume. List all the owners of the specified path, seperated by commas Produce a compact output that is easily parsed by other scripts and programs. When used with option, displays all the owners seperated by dots This format is described in the section below. Output from diskowner displays the following possible output: owner The owner of the given path. owner can be one of the following: The path is not owned by any known subsystem. The path is part of an LVM volume group. The path is part of a VxVM volume group. The path has a VxFS filesystem on it. The path has a HFS filesystem on it. The path is being used as a swap device. The path is being used as a dump device. The path is part of an Oracle database. The path has EFI partitions on it. message An error message displayed when the given path is invalid or inaccessible. Compact Listing The option generates a compact, colon delimited listing that is easy to parse. The output format is: and so forth. The option, when used with the option, produces this output format: and so forth. The current command prints out the keys and values listed below. In the future, new keys and/or values may be added to the output. or or where path is the pathname passed as argument owner is the owner of the given path message is an error message when given path is invalid or inaccessible. n is number of owners of the given path EXTERNAL INFLUENCES
Environment Variables determines the language in which messages are displayed. If is not specified or is null, it defaults to "C" (see lang(5)). If any internationalization variable contains an invalid setting, all internationalization variables default to "C" (see environ(5)). RETURN VALUE
Upon completion, returns one of the following values: The path is not owned (the owner is The path is already owned by a subsystem. The path does not exist. Invalid options or library version incompatible. The path cannot be opened due to an I/O error. The path cannot be opened due to insufficient permissions. The path format is invalid. EXAMPLES
Display the owner of a disk path: Display the owner of a logical volume in compact output: Display all the owners of a disk path: Display all the owners of a logical volume in compact output: SEE ALSO
crashconf(1M), df(1M), swapinfo(1M), vgdisplay(1M), vxvmboot(1M), vxassist(1M), fstab(4). diskowner(1M)
All times are GMT -4. The time now is 08:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy