02-09-2006
Help Please. Need to add quotes to o field
I have a tab delimited file with 4 fields.
I need to surround each field with a " (quote).
example:
K112 E-3433 SHOE REPAIR KIT 3
K119 E-1887ASHD SHOE REPAIR KIT 6
K128 E-2769SHD SHOE REPAIR KIT 3
K128K E-2769HD & SHD SHOE REPAIR KIT 15
needs to be:
"K112" "E-3433" "SHOE REPAIR KIT" 3"
"K119" "E-1887ASHD" "SHOE REPAIR KIT" "6"
"K128" "E-2769SHD" "SHOE REPAIR KIT" "3"
"K128K" "E-2769HD & SHD" "SHOE REPAIR KIT" "15"
don't care if it is a script or a command line command.
Just don't know how to do this.
Any help would be greatly appreciated.
Thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have a file that looks like the following:
Name1 aaa bbbb
Name1 ffd hhghg
Name1 dffg ghhhh
Name2 rtrt dfff
Name2 rrtfr tgtt
Name2 dsddf gfggf
Name2 ffffg gfgf
NAme3 fdff ghhgh
Is it possible to format it so that a number... (2 Replies)
Discussion started by: azekry
2 Replies
2. UNIX for Dummies Questions & Answers
Hi All, I love this site, it helps newbie people like me and I appreciate everyone's help!
Here is my questions.
I am trying to concatenate a single quote into a character/string from a text file for each line (lets say ABC should look like 'ABC').
I tried to use awk print command to do... (1 Reply)
Discussion started by: mrjunsy
1 Replies
3. Shell Programming and Scripting
I have a line in multiple scripts:select into table /dir1/dir2/file.dat
dir1 and dir2 are the same but file.dat is different from script to script.
I need to include /dir1/dir2/file.dat into double quotes in each file of my directory:select into table "/dir1/dir2/file.dat" (13 Replies)
Discussion started by: surfer515
13 Replies
4. Shell Programming and Scripting
Hi Everyone,
a.txt
a b c 1 e e e e e
a b c 2 e e e e e
the output is
a b c 1 e e e e e
a 00b c 2 e e e e e
when 4th field = '2', then add '00' in the front of 2nd field value.
Thanks (9 Replies)
Discussion started by: jimmy_y
9 Replies
5. Shell Programming and Scripting
I have a file with three fields and field delimiter '|' like:
abc|12:13:45|123
xyz|12:87:32|
qwe|54:21:09
In the file the 1st line has proper data -> abc|12:13:45|123
,the 2nd line doesnt has data for the 3rd field which is okay
, the 3rd line doesnt has data for the 3rd field as well the... (5 Replies)
Discussion started by: mehimadri
5 Replies
6. UNIX for Dummies Questions & Answers
Hi ,
I have extract a single field from the 2nd row of a file of which the format is as given below
"Field1","Field2","Field3",...,"Field17",...
I need to cut Field17 as such (no quotes required)..
I give the command
head -2 file_name | tail -1 | cut -d "," -f17
But the output is... (2 Replies)
Discussion started by: nivin_govindan
2 Replies
7. Shell Programming and Scripting
Hi, all
I need to get fields in a line that are separated by commas, some of the fields are enclosed with double quotes, and they are supposed to be treated as a single field even if there are commas inside the quotes.
sample input:
for this line, 5 fields are supposed to be extracted, they... (8 Replies)
Discussion started by: kevintse
8 Replies
8. Shell Programming and Scripting
How can I use single quotes as field separator in awk? (1 Reply)
Discussion started by: locoroco
1 Replies
9. Shell Programming and Scripting
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)
Discussion started by: cmccabe
6 Replies
10. Shell Programming and Scripting
Hi Experts,
Please support
I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6.
... (3 Replies)
Discussion started by: as7951
3 Replies
LEARN ABOUT CENTOS
p11-kit
P11-KIT(8) System Commands P11-KIT(8)
NAME
p11-kit - Tool for operating on configured PKCS#11 modules
SYNOPSIS
p11-kit list-modules
p11-kit extract --filter=<what> --format=<type> /path/to/destination
DESCRIPTION
p11-kit is a command line tool that can be used to perform operations on PKCS#11 modules configured on the system.
See the various sub commands below. The following global options can be used:
-v, --verbose
Run in verbose mode with debug output.
-q, --quiet
Run in quiet mode without warning or failure messages.
LIST MODULES
List system configured PKCS#11 modules.
$ p11-kit list-modules
The modules, information about them and the tokens present in the PKCS#11 modules will be displayed.
EXTRACT
Extract certificates from configured PKCS#11 modules.
$ p11-kit extract --format=x509-directory --filter=ca-anchors /path/to/directory
You can specify the following options to control what to extract. The --filter and --format arguments should be specified. By default this
command will not overwrite the destination file or directory.
--comment
Add identifying comments to PEM bundle output files before each certificate.
--filter=<what>
Specifies what certificates to extract. You can specify the following values:
ca-anchors
Certificate anchors (default)
trust-policy
Anchors and blacklist
blacklist
Blacklisted certificates
certificates
All certificates
pkcs11:object=xx
A PKCS#11 URI
If an output format is chosen that cannot support type what has been specified by the filter, a message will be printed.
None of the available formats support storage of blacklist entries that do not contain a full certificate. Thus any certificates
blacklisted by their issuer and serial number alone, are not included in the extracted blacklist.
--format=<type>
The format of the destination file or directory. You can specify one of the following values:
x509-file
DER X.509 certificate file
x509-directory
directory of X.509 certificates
pem-bundle
File containing one or more certificate PEM blocks
pem-directory
Directory PEM files each containing one certifiacte
openssl-bundle
OpenSSL specific PEM bundle of certificates
openssl-directory
Directory of OpenSSL specific PEM files
java-cacerts
Java keystore 'cacerts' certificate bundle
--overwrite
Overwrite output file or directory.
--purpose=<usage>
Limit to certificates usable for the given purpose You can specify one of the following values:
server-auth
For authenticating servers
client-auth
For authenticating clients
email
For email protection
code-signing
For authenticated signed code
1.2.3.4.5...
An arbitrary purpose OID
EXTRACT TRUST
Extract standard trust information files.
$ p11-kit extract-trust
OpenSSL, GnuTLS and Java cannot currently read trust information directly from the trust policy module. This command extracts trust
information such as certificate anchors for use by these libraries.
What this command does, and where it extracts the files is distribution or site specific. Packagers or administrators are expected
customize this command.
BUGS
Please send bug reports to either the distribution bug tracker or the upstream bug tracker at
https://bugs.freedesktop.org/enter_bug.cgi?product=p11-glue&component=p11-kit.
SEE ALSO
pkcs11.conf(5)
Further details available in the p11-kit online documentation at http://p11-glue.freedesktop.org/doc/p11-kit/.
p11-kit P11-KIT(8)