Append 1st field from a file into 2nd field of another file
Hi,
I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much.
Actually, I'm in short with time. So I had to post my case. Hoping that you can help.
I have 2 files,
FILE1
FILE2
I want to
(a) append the filed in FILE2, into 2nf field of FILE1:
and in other run
(b) append the filed in FILE2, into FILE1 as follows:
In ADDITION & generally, can you provide me with a solution that:
extracts the "Nth" field from FILE1 into the "Mth" filed in FILE2?
Waiting for your input, with my appreciation in advance.
I have two files. File A and File B.
File A has two fields separated by comma
352020252365988, 652020100572356
546876543215667, 652065465654686
...
File B has many Fields separate by spaces
Date Name 352020252365988 Reference
Date2 Name2 546876543215667 Reference
I want to... (4 Replies)
Hi All,
I have two comma separated value(CSV) files, say FileA and FileB.
The contents looks like that shown below.
FileA
EmpNo,Name,Age,Sex,
1000,ABC,23,M,
1001,DES,24,F, ... (2 Replies)
I want to sort alphabetically on the first field and sort in descending numerical order on the 2nd field. With a normal "sort -r -n" it does this:
abc ||| 5e-05 ||| bla
abc ||| 3 ||| ble
def ||| 1 ||| abc
def ||| 0.2 ||| def
As you can see it ignores the fact that 5e-05 is actually 0.00005... (1 Reply)
Hi,
I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much.
Actually, I'm in short with time. So I had to post my case. Hoping that you can help.
I have 2 files,
FILE1
... (0 Replies)
Hi Friends,
I am new to Shell Scripting and need your help in the below situation.
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- "Application handle" is the common field in both the files.
(NOTE :- PLEASE REFER TO THE ATTACHMENT "Compare files... (2 Replies)
Hi Friends,
Need Help. I have file1.txt as
File1.txt
|123|A|7267|Hyder|Cross|Sell|7801
|995|A|7051|2008|Lunar|New|Year|Promotion|7801
|996|A|7022|Q108|Targ|Prospect|&|SSCC|Savings|Promo|7801
|997|A|7182|Q1|Feb-Apr|08|Credit|ITA|PA|SBA|Campaign|7801
File2.txt... (7 Replies)
I have a .CSV file (file.csv) whose data are all enclosed in double quotes. Sample format of the file is as below:
column1,column2,column3,column4,column5,column6, column7, Column8, Column9, Column10
"12","B000QRIGJ4","4432","string with quotes, and with a comma, and colon: in... (3 Replies)
Hi,
For example:
I have:
HostA,XYZ
HostB,XYZ
HostC,ABC
I would like the output to be:
HostA,HostB: XYZ
HostC:ABC
How can I achieve this?
So far what I though of is: (1 Reply)
hi
I have 2 file with more than 10 columns for both
1st file
apple,0,0,0......
orange,1,2,3.....
mango,2,4,5.....
2nd file
apple,2,3,4,5,6,7...
orange,2,3,4,5,6,8...
watermerlon,2,3,4,5,6,abc...
mango,5,6,7,4,6,def.... (1 Reply)
Discussion started by: tententen
1 Replies
LEARN ABOUT DEBIAN
keyhead
keyhead(1) General Commands Manual keyhead(1)Name
keyhead - Change FITS or IRAF header keyword names
Synopsis
keyhead [-hknv] <FITS or IRAF file> kw1=kw1a kw2=kwd2a ... kwn=kwdna
Description
Change the names of keywords in FITS or IRAF image headers. Each current image keyword whose entry is to be modified should be followed by
an equal sign and a second keyword, with no intervening spaces. If the -r option is used, the value of the second keyword is transfered to
that of the first. Otherwise, the name of the first keyword is changed to the second keyword. To change keywords in a list of files, sub-
stitute @<listfile> for the file names on the command line. To change a lot of keywords, put them, one pair separated by an = sign with no
spaces per line, in a file and substitute @<keylistfile> on the command line. If two @ commands are present, the program will figure out
which contains file names and which contains keywords. Lines in a keyword list file which do not contain an = are ignored.
Options-h Write HISTORY line into output header with sethead version, current date and time, and names of keywords set.
-k Write KEYHEAD keyword into output header with the keyhead version, current date and time, and names of keywords whose names are
changed. If a KEYHEAD keyword already exists, move the old value to a HISTORY line before writing the new value
-n Write a new file with an added "e" before the extension.
-r letter
Replace value of 1st keyword with value of 2nd keyword instead of changing the name of the 1st keyword to the 2nd keyword. The 2nd
keyword remains in the header. If the 1st keyword does not exist in the header, it is created.
-v Print confirmations of each keyword change.
Web Page
http://tdc-www.harvard.edu/software/wcstools/keyhead.html
Author
Doug Mink, SAO (dmink@cfa.harvard.edu)
6 July 2001 WCSTools keyhead(1)