06-27-2012
Quote:
the first four columns of each file
as in
abcd 123 198 xyz1
In other words, each columns are separated by ' '(space)?
Quote:
and not just the first column
$1 in my script means the first field, as in
abcd 123 198 xyz1, because I set FS to
:
If anything else, sorry I don't understand your request, as, for me, your output == cat file2
Last edited by tukuyomi; 06-27-2012 at 05:03 PM..
This User Gave Thanks to tukuyomi For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hello
I need to compare 2 text files. File 1 has 2 columns and file 2 has 1 to many.
Sample:
File 1:
111 555
222 666
333 777
444 755
File 2:
000 110 113 114
844 111 555 999
202 777 865 098 023
222 313 499
065 655 333 011 890 777
433 (15 Replies)
Discussion started by: stevesmith
15 Replies
2. Shell Programming and Scripting
Hi there,
I was wondering if someone can help me with this.
I am trying the combine multiple columns from multiple files into one file.
Example file 1:
c0t0d0 c0t2d0 # hostname vgname
c0t0d1 c0t2d1 # hostname vgname
c0t0d2 c0t2d2 # hostname vgname
c0t1d0 c0t3d0 # hostname vgname1... (5 Replies)
Discussion started by: martva
5 Replies
3. Shell Programming and Scripting
I get the point of number subtraction in one column
awk 'NR==1 {n=$1; next}; {n-=$1} END {print n}' inputfile
but I cannot figure it out how to do this to multiple
columns.
awkward. (6 Replies)
Discussion started by: awkward
6 Replies
4. Shell Programming and Scripting
hello,
I will would be grateful if anyone can help me reply to my post
extract multiple cloumns from multiple files; skip rows and include filenames; awk
Please see this thread.
Thanks
manishabh (0 Replies)
Discussion started by: manishabh
0 Replies
5. UNIX for Dummies Questions & Answers
Hypothetically, suppose that
file1
id v1 v2 v3 v4 v5 v6 v7..........v100
1 1 1 1 1 1 2 2 .....50
2 1 1 1 1 1 2 2 .....50
3 1 1 1 1 1 2 2 .....50
4 1 1 1 1 1 2 2 .....50
5 1 1 1 1 1 2 2 .....50
I want to write a loop such that I take the id# and the first 5 columns (v1-v5) into the... (3 Replies)
Discussion started by: johnkim0806
3 Replies
6. Shell Programming and Scripting
Hi,
I need to compare multiple columns from 2 files.
I can, for example, have these 2 files:
file1:
col1, col2, col3,col4
a,1,4,7
b,2,5,8
c,3,6,9file2:
col1, col2, col3,col4
a,2,3,2
b,5,7,5
c,1,9,8As a result, I need for example the difference between the columns 2 and 4:
col2,... (3 Replies)
Discussion started by: Subbeh
3 Replies
7. Shell Programming and Scripting
Hi guys,
I have very basic linux experience so I need some help with a problem.
I have 3 files from which I want to extract columns based on common fields between them.
File1:
--- rs74078040 NA 51288690 T G 461652 0.99223 0.53611 3
--- rs77209296 NA 51303525 T G 461843 0.98973 0.60837 3... (10 Replies)
Discussion started by: bartman2099
10 Replies
8. Shell Programming and Scripting
Hi,
I have multiple files that each contain one column of strings:
File1:
123abc
456def
789ghi
File2:
123abc
456def
891jkl
File3:
234mno
123abc
456def
In total I have 25 of these type of file. (5 Replies)
Discussion started by: owwow14
5 Replies
9. Shell Programming and Scripting
Hello guys, I am quite new to Shell Scripting and I need help for this
I have a CSV file like this:
Requisition,Order,RequisitionLineNumber,OrderLineNumber
REQ1,Order1,1,1
REQ1,Order1,1,3
REQ2,Order2,1,5
Basically what I want to do is compare the first 3 fields
If all 3 fields are the same... (5 Replies)
Discussion started by: jeffreybsu
5 Replies
10. Shell Programming and Scripting
Hello Gurus,
I have a multiple pipe separated files which have records going over multiple Lines. End of line separator is \n and records going over multiple lines have <CR> as separator. below is example from one file.
1|ABC DEF|100|10
2|PQ
RS
T|200|20
3| UVWXYZ|300|30
4| GHIJKL|400|40... (7 Replies)
Discussion started by: dJHa
7 Replies
LEARN ABOUT CENTOS
tpm_quote_tools
TPM QUOTE
TOOLS(8) TPM QUOTE TOOLS(8)
NAME
TPM Quote Tools
PROGRAMS
tpm_mkuuid, tpm_mkaik, tpm_loadkey, tpm_unloadkey, tpm_getpcrhash, tpm_updatepcrhash, tpm_getquote, tpm_verifyquote
DESCRIPTION
TPM Quote Tools is a collection of programs that provide support for TPM based attestation using the TPM quote operation.
A TPM contains a set of Platform Configuration Registers (PCRs). In a well configured machine, some of these registers are set to known
values during the boot up process or at other times. For example, a PCR might contain the hash of a boot loader in memory before it is
run.
The TPM quote operation is used to authoritatively verify the contents of a TPM's Platform Configuration Registers (PCRs). During provi-
sioning, a composite hash of a selected set of PCRs is computed. The TPM quote operation produces a composite hash that can be compared
with the one computed while provisioning.
To use the TPM quote operation, keys must be generated. During provisioning, an Attestation Identity Key (AIK) is generated for each TPM,
and the public part of the key is made available to entities that validate quotes.
The TPM quote operation returns signed data and a signature. The data that is signed contains the PCRs selected for the operation, the
composite hash for the selected PCRs, and a nonce provided as input, and used to prevent replay attacks. At provisioning time, the data
that is signed is stored, not just the composite hash. The signature is discarded.
An entity that wishes to evaluate a machine generates a nonce, and sends it along with the set of PCR used to generate the composite PCR
hash at provisioning time. For this use of the TPM quote operation, the signed data is ignored, and the signature returned is used to val-
idate the state of the TPM's PCRs. Given the signature, the evaluating entity replaces the nonce in the signed data generated at provi-
sioning time, and checks to see if the signature is valid for the data. If so, this check ensures the selected PCRs contain values that
match the ones measured during provisioning.
A typical scenario for an enterprise using these tools follows. The tools expect AIKs to be referenced via one enterprise-wide Universally
Unique Identifier (UUID). The program tpm_mkuuid creates one.
For each machine being checked, an AIK is created using tpm_mkaik. The key blob produced is bound to the UUID on its machine using
tpm_loadkey. The public key associated with the AIK is sent to the entities that verify quotes. Finally, the expected PCR composite hash
is obtained using tpm_getpcrhash. When the expected PCR values change, a new hash can be generated with tpm_updatepcrhash.
The program to obtain a quote, and thus measure the current state of the PCRs is tpm_getquote. The program that verifies the quote
describes the same PCR composite hash as was measured initially is tpm_verifyquote.
SEE ALSO
tpm_mkuuid(8), tpm_mkaik(8), tpm_loadkey(8), tpm_unloadkey(8), tpm_getpcrhash(8), tpm_updatepcrhash(8), tpm_getquote(8), tpm_verifyquote(8)
Oct 2010 TPM QUOTE TOOLS(8)