Well that's interesting given that both solutions only look at the first column and completely ignore what is in the other columns. Can you please post an example of the data from both files, the output that you are getting, and an indication of what is wrong? Also, if you can indicate which solution (single awk or awk-sort-awk) that you are trying that'd be great too. I've not been able to create a situation where it generated duplicates that weren't in the first column.
I also discovered a bug with the awk-sort-awk programme. Wouldn't be causing your issue, but it would cause the last set to not be printed.
I am trying to find all files in a directory whose name has a real number larger then the number I am looking for.
For example:
.
|-- delta.1.5.sql
|-- delta.2.1.sql
|-- delta.2.2.sql
|-- delta.2.3.sql
|-- delta.2.4.sql
`-- delta.2.5.sql
I know my database is at 2.2 so I want an... (2 Replies)
I couldn't find the original thread that I created and since I didn't get a definitive answer, I figured I'd try again. Maybe this time I can describe what I want a little better.
I've got two files, each with thousands of names all separated by new line. I want to know if 'name in file1'... (2 Replies)
Hi all.
I have a directory which contains files that can be versioned. All the files are named according to a pattern like this:
TEXTSTRING1-001.EXTENSION
TEXTSTRING2-001.EXTENSION
TEXTSTRING3-001.EXTENSION
...
TEXTSTRINGn-001.EXTENSION
If a file is versioned, a file called
... (10 Replies)
hi,
I need a help. I used this command to list all the log files which are for more than 10 days to a text file.
find /usr/script_test -type f -mtime +10>>/usr/ftprm.txt
I want all these files listed in the ftprm.txt to be ftp in another machine and then rm the files.
Anyone can help me... (8 Replies)
I have 2 files; file 1 having smaller positions that overlap with the positions with positions in file2.
file1
aaa 20 22 apple
aaa 18 25 banana
aaa 12 30 grapes
aaa 22 25 melon
file2
aaa 18 26 cdded
aaa 10 35 abcde
I want to get something like this
output
aaa 18 26 cdded banana... (4 Replies)
I am running a UNIX script to get unused files and their sizes from the server. The issue is arising due to the spaces present in the filename/folder names.Due to this the du -k command doesn't work properly.But I need to calculate the size of all files including the ones which have spaces in them.... (4 Replies)
So, I have a directory tree that has many files named thusly:
X_REVY.PDF
I need to find any files that have the same X portion (which can be nearly anything) as any another file (in any directory) but have different Y portions (which can be any number from 1-99).
I then need it to return... (3 Replies)
I'm interested in writing a report script using BASH that searches all of the files in a particular directory for a keyword and printing a list of files containing this string...
In fact this reporting script would have searches for multiple keywords, so I'm interested in making multiple... (2 Replies)
Hi,
I have been trying to retrieve the names of files present in a directory one by one but the names of files are getting overlapped on one another.
I tried the below command.
ls -1 > filename
please help me in getting the file names line by line without overlapping. I am using korn... (6 Replies)
Discussion started by: Pradhikshan
6 Replies
LEARN ABOUT DEBIAN
gethead
gethead(1) General Commands Manual gethead(1)Name
gethead - Print FITS or IRAF header keyword values
Synopsis
gethead [-hptv] [-d pathname] [-n num] <FITS or IRAF file> kw1 kw2 ... kwn
Description
Print values of the specified keywords from the given image header. By default they are all listed on one line, separated by spaces. The
-v flag causes the keyword names and values to be printed, one keyword per line. To read keywords from a list of files, substitute @<list-
file> for the file names on the command line. To read a lot of keywords, put them, one 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.
Options-a List file name even if keywords are not found
-d Root directory for input files (default is cwd)
-e Output keyword=value's on one line per file
-f Never print filenames (default is to print them if more than one)
-g Output keyword=value's on one line per keyword
-h flag causes the keyword names to be printed at top of columns.
-n Number of decimal places in numeric output
-o OR conditions instead of ANDing them
-p Print full pathnames of files
-t flag causes the output to be in tab-separated tables with keyword column headings.
-u Always print ___ if keyword not found, event if only one keyword in search
-v Print output as <keyword>=<value>, one per line
Web Page
http://tdc-www.harvard.edu/software/wcstools/gethead.html
Author
Doug Mink, SAO (dmink@cfa.harvard.edu)
6 July 2001 WCSTools gethead(1)