10-28-2011
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file with a few thousand lines and I'd like to remove all the lines that have more than 1 asterik (the * character) in it. So if it has 2 or more in a single line, I'd like the line removed (double d command in vi) (12 Replies)
Discussion started by: guitarscn
12 Replies
2. UNIX for Advanced & Expert Users
I have a '~' delimited file of 6 - 7 million rows. Each row should contain 13 columns delimited by 12 ~'s. Where there are 13 tildes, the row needs to be removed. Each row contains alphanumeric data and occasionally a ~ ends up in a descriptive field and therefore acts as a delimiter, resulting... (7 Replies)
Discussion started by: kpd
7 Replies
3. HP-UX
Hi Experts,
I have data coming in 4 columns and there are new line characters \n in between the data. I need to remove the new line characters in the middle of the row and keep the \n character at the end of the line.
File is comma (,) seperated.
Eg:
ID,Client ,SNo,Rank
37,Airtel \n... (8 Replies)
Discussion started by: sasikari
8 Replies
4. UNIX for Advanced & Expert Users
Hi.
I have a huge file (350 million lines).
I need to delete all lines in it that:
1. Begin with a pipe character -- '|'
2. Or have less than 5 pipe characters in the line
Have been searching for some SED/AWK help for this (which is faster btw on such a ginormous file?) but only... (7 Replies)
Discussion started by: pkiula
7 Replies
5. Shell Programming and Scripting
Hi, I have one file, I need to check if file exist or not and then remove the lines which starts with ?
My file1.out data is some thing
abcabcppp
xyzxyzpqr
?????????
?????????
Output should be in test.out
abcabcppp
xyzxyzpqr
I am getting the output as below but the File does not exist... (4 Replies)
Discussion started by: Ramyajiguru1
4 Replies
6. Shell Programming and Scripting
I want to remove commands having no output. In below text file.
bash-3.2$ cat abc_do_it.txt
grpg10so>show trunk group all status
grpg11so>show trunk group all status
grpg12so>show trunk group all status
GCPKNYAIGT73IMO 1440 1345 0 0 94 0 0 INSERVICE 93% 0%... (4 Replies)
Discussion started by: Raza Ali
4 Replies
7. Shell Programming and Scripting
I have been searching and trying to come up with an awk that will perform the following on a
converted text file (original is a pdf).
1. Since the first two lines are (begin with) text they are removed
2. if $1 is a number then all text is merged (combined) into one line until the next... (3 Replies)
Discussion started by: cmccabe
3 Replies
8. Shell Programming and Scripting
I have a file which comes every day and the file data look's as below.
Vi abc.txt
a|b|c|d\n
a|g|h|j\n
Some times we receive the file with only a new line character in the file like
vi abc.txt
\n (8 Replies)
Discussion started by: rak Kundra
8 Replies
9. UNIX for Beginners Questions & Answers
I have a file of a content like this:
abc_bla -def 800
abc_bla -def 802
abc_bla -def 804
abc_bla -def 806
abc_bla -def 808
abc_bla -def 810
abc_bla -def 812
abc_bla -def 814
...
abc_bla -def 898
abc_bla -def 900
abc_bla -def 902
abc_bla -def 904
...
abc_bla -def 990
abc_bla -def... (7 Replies)
Discussion started by: maya3
7 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I came across one issue recently where output from one of the columns of the table from where i am creating input file has newline characters hence, record in the file is spread over multiple lines. Fields in the file are separated by pipe (|) delimiter. As header will never have newline... (4 Replies)
Discussion started by: Prathmesh
4 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)