Sponsored Content
Top Forums Shell Programming and Scripting Need shell script to append double quotes for each column in a file Post 303003941 by RudiC on Saturday 23rd of September 2017 06:18:37 AM
Old 09-23-2017
That replaces any substring NOT containing | nor " , be it enclosed in double quotes or not, with itself enclosed in double quotes. In the requestor's sample line that occurs 4 times.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

put double quotes for a column

Hi, I have a file which looks like this, I have stripped most of the columns: 2006,UCA,"02452","NM","1","M","84",123,aa 2006,UCA,"02452","NM","1","L","84",123,bb 2006,UCA,"02452","NM","1","L","84",432,cc 2006,UCA,"02452","NM","1","L","33",213,dd 2006,UCA,"02452","NM","1","L","33",124,ee... (3 Replies)
Discussion started by: sumeet
3 Replies

2. Shell Programming and Scripting

To append two columns without double quotes

Hi i have a file with follw data "20090427","0","","16371311","-100200","","","","16371311","JUL","09" In the 10th column i need to convert the month name into month number in this case JUL will be 7 and append the 10th and 11th column which shows me the output as 709. Can you suggest a shell... (11 Replies)
Discussion started by: vee789
11 Replies

3. Shell Programming and Scripting

shell script - to append single quotes and comma

file1 ---- 34556745 32678343 31576776 31455566 21356666 I want to assign the record values to a variable in the below format, so that I can use output in .sql file for querying in database. ('34556745', '32678343', '31576776', '31455566', '21356666') ----------- below is the... (11 Replies)
Discussion started by: rajivrsk
11 Replies

4. UNIX for Dummies Questions & Answers

append column and row header to a file in awk script.

Hi! Is there a way to append column and row header to a file in awk script. For example if I have Jane F 39 manager Carlos M 40 system administrator Sam F 20 programmer and I want it to be # name gend age occup 1 Jane F 39 manager 2 Carlos M ... (4 Replies)
Discussion started by: FUTURE_EINSTEIN
4 Replies

5. Shell Programming and Scripting

Issue with Single Quotes and Double Quotes for prompt PS1

Hi, Trying to change the prompt. I have the following code. export PS1=' <${USER}@`hostname -s`>$ ' The hostname is not displayed <abc@`hostname -s`>$ uname -a AIX xyz 1 6 00F736154C00 <adcwl4h@`hostname -s`>$ If I use double quotes, then the hostname is printed properly but... (3 Replies)
Discussion started by: bobbygsk
3 Replies

6. Shell Programming and Scripting

Shell script that should remove unnecessary commas between double quotes in CSV file

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)
Discussion started by: mathias23
5 Replies

7. Shell Programming and Scripting

Handling embedded double quotes within column data

I have a text file where each field is enclosed in double quotes and separated by a comma. But in certain rows we have embedded double quotes within column data For e.g """TRUSPICE CENTRE"" CLAYTON AU" The above value is for a single column but there are embedded quotes within... (2 Replies)
Discussion started by: abhilashnair
2 Replies

8. Shell Programming and Scripting

Replace Double quotes within double quotes in a column with space while loading a CSV file

Hi All, I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes. Sample Data : "221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
Discussion started by: mlavanya
6 Replies

9. Shell Programming and Scripting

awk script to append suffix to column when column has duplicated values

Please help me to get required output for both scenario 1 and scenario 2 and need separate code for both scenario 1 and scenario 2 Scenario 1 i need to do below changes only when column1 is CR and column3 has duplicates rows/values. This inputfile can contain 100 of this duplicated rows of... (1 Reply)
Discussion started by: as7951
1 Replies

10. UNIX for Beginners Questions & Answers

How to insert data into black column( Secound Column ) in excel (.XLSX) file using shell script?

Source Code of the original script is down below please run the script and try to solve this problem this is my data and I want it column wise 2019-03-20 13:00:00:000 2019-03-20 15:00:00:000 1 Operating System LAB 0 1 1 1 1 1 1 1 1 1 0 1 (5 Replies)
Discussion started by: Shubham1182
5 Replies
path_to_inst(4) 						   File Formats 						   path_to_inst(4)

NAME
path_to_inst - device instance number file SYNOPSIS
/etc/path_to_inst DESCRIPTION
/etc/path_to_inst records mappings of physical device names to instance numbers. The instance number of a device is encoded in its minor number, and is the way that a device driver determines which of the possible devices that it may drive is referred to by a given special file. In order to keep instance numbers persistent across reboots, the system records them in /etc/path_to_inst. This file is read only at boot time, and is updated by add_drv(1M) and drvconfig(1M). Note that it is generally not necessary for the system administrator to change this file, as the system will maintain it. The system administrator can change the assignment of instance numbers by editing this file and doing a reconfiguration reboot. However, any changes made in this file will be lost if add_drv(1M) or drvconfig(1M) is run before the system is rebooted. Each instance entry is a single line of the form: "physical name" instance number "driver binding name" where physical name is the absolute physical pathname of a device. This pathname must be enclosed in double quotes. instance number is a decimal or hexadecimal number. driver binding name is the name used to determine the driver for the device. This name may be a driver alias or a driver name. The driver binding name must be enclosed in double quotes. EXAMPLES
Example 1: Sample path_to_inst Entries Here are some sample path_to_inst entries: "/iommu@f,e0000000" 0 "iommu" "/iommu@f,e0000000/sbus@f,e0001000" 0 "sbus" "/iommu@f,e0000000/sbus@f,e0001000/sbusmem@e,0" 14 "sbusmem" "/iommu@f,e0000000/sbus@f,e0001000/sbusmem@f,0" 15 "sbusmem" "/iommu@f,e0000000/sbus@f,e0001000/ledma@f,400010" 0 "ledma" "/obio/serial@0,100000" 0 "zs" "/SUNW,sx@f,80000000" 0 "SUNW,sx" FILES
/etc/path_to_inst SEE ALSO
add_drv(1M), boot(1M), drvconfig(1M), mknod(1M) WARNINGS
If the file is removed the system may not be bootable (as it may rely on information found in this file to find the root, usr or swap device). If it does successfully boot, it will regenerate the file, but after rebooting devices may end up having different minor numbers than they did before, and special files created via mknod(1M) may refer to different devices than expected. For the same reasons, changes should not be made to this file without careful consideration. NOTES
This document does not constitute an API. path_to_inst may not exist or may have a different content or interpretation in a future release. The existence of this notice does not imply that any other documentation that lacks this notice constitutes an API. SunOS 5.10 2 Nov 1995 path_to_inst(4)
All times are GMT -4. The time now is 06:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy