Hi,
I am not sure how to start doing this so I hope to get some advice as to how to start.
I have 2 files. The source file contains data that I needed is in columns delimited by ";". For example, in this format:
"CONTINENT","COUNTRY","CITY","ID"
"asia","japan","tokyo","123"... (21 Replies)
Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents.....
I try with "diff"...... but confusion how to use "diff" with if ---else
Thanking you (5 Replies)
Hi,
I want to delete the contents of a file which are matching with contents of other file in shell scripting.
Ex.
file1
sheel,sumit,1,2,3,4,5,6,7,8
sumit,rana,2,3,4,5,6,7,8,9
grade,pass,2,3,4,5,6,232,1,1
name,sur,33,1,4,12,3,5,6,8
sheel,pass,2,3,4,5,6,232,1,1
File2... (3 Replies)
Hi,
I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file.
i am able to... (2 Replies)
Hi so far I created this script:
vi loop.beta.sh
for i in `cat extract.filenames.tabc`
do
echo $i
done>$i
===
This is the original text file.
$ more tabc.txt
-rwx------- 1 alice staff 1586 2010-11-05 02:27 request-key
.conf
-rwx------- 1 ted staff 126 ... (3 Replies)
FILE_ID extraction from file name and save it in CSV file after looping through each folders
My files are located in UNIX Server, i want to extract file_id and file_name from each file .and save it in a CSV file. How do I do that?
I have folders in unix environment, directory structure is... (15 Replies)
Hi All,
Please help.
I have got a file which contains a listing of a file and some directories after it, one by one. I am calling this file xyz.txt here
file1
dir1
dir2
dir3
dir4
file2
dir5
dir6
dir7
dir8
file3
dir9
dir10
dir11
dir12 (6 Replies)
Hi,
I am doing something basic, but I am missing something. Im trying to read the contents of a file and taking those values and connecting to a database. However, it only connect to one (or reads in) value and then exists.
Here is what it looks like:
listname.txt
db1
db2
db3
Script:... (15 Replies)
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Hi all,
I am trying to loop through the string contents of an array, to add it during the saving of the output files. I am trying this code to print each column and save it to unique file name, but it doesn't work. Thanks for any help.
fnam=(japan usa uk)
alldata.dat contained sample data... (1 Reply)
Discussion started by: ida1215
1 Replies
LEARN ABOUT DEBIAN
fitsort
fitsort(1) General Commands Manual fitsort(1)NAME
fitsort - sort FITS header information from a list of files
SYNOPSIS
dfits <FITS files...> | fitsort <FITS keywords...>
DESCRIPTION
fitsort extract keyword values from a set of FITS headers and outputs it in an ASCII table format, which is compatible with most data pro-
cessing software packages. It shall only be used in combination with the dfits utility.
The ASCII output is shown in columns. Columns are aligned with blank characters and also separated by tabulations. Blank alignment allows
human readers to visualize the output in a pretty format, tabulations are there for spreadsheet compatibility. If you want to load out fit-
sort output into any spreadsheet, specify that fields shall be separated by tabulations and entries separated by linefeeds.
Examples :
dfits *.fits | fitsort BITPIX NAXIS NAXIS1 NAXIS2
The output would look like:
FILE BITPIX NAXIS NAXIS1 NAXIS2
file0001.fits 16 2 128 128
file0002.fits 32 2 512 512
...
ESO specific features in the FITS header are also supported. To get values for 'HIERARCH ESO' keywords, just give the complete names within
double quotes. e.g.
dfits *.fits | fitsort "HIERARCH ESO INS LENS"
Another way of giving HIERARCH ESO keywords is to use the short FITS notation, the above example can be given as:
dfits *.fits | fitsort INS.LENS
Example: to retrieve the DPR keywords from an ESO FITS header, you would use:
dfits *.fits | fitsort To be completed... DPR.CATG DPR.TYPE DPR.TECH
This second way of requesting HIERARCH ESO keywords is not only shorter to type, it also avoids typing quotes or double-quotes on the com-
mand-line, making it easier to script with fitsort.
Notice that the keywords you give on the command-line are case-insensitive. The above line is equivalent to:
dfits *.fits | fitsort dpr.catg dpr.type dpr.tech
OPTIONS -d Do not print out the first output line. This option is useful to get only the query results, without the top line (giving all column
names). This makes it easy to script fitsort from programs like awk or perl.
FILES
Input files to dfits shall all comply with FITS format. fitsort also supports HIERARCH ESO FITS format.
SEE ALSO
dfits (1)
25 Jun 2001 fitsort(1)