Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

replacekey(1) [debian man page]

replacekey(1)						      General Commands Manual						     replacekey(1)

NAME
replacekey - replace keywords in a FITS header SYNOPSIS
replacekey [options] <in> DESCRIPTION
replacekey is aimed at replacing keywords in a FITS file's header by new keywords provided by the user on the command-line. ALGORITHM
The user can provide a new_keyword, an old_keyword, a value and a comment. first searchs for old_keyword if provided. If it finds it, it replaces the associated card by the new one (new_keyword=value/comment). If old_keyword is either not found or not provided, associated card by the new one (new_keyword=value/comment). new_keyword has to be provided. Examples: You want to change the value of VALUE from 32 to 16 in myfile.fits: % replacekey -k "VALUE" -v "16" myfile.fits If you want to replace the card with the keyword OLD by "NEW = 3.14 / This is a usefull key" in myfile.fits: % replacekey -k "NEW" -v "3.14" -c "This is a usefull key" -K "OLD" myfile.fits If your do not care about the HISTORY cards you have in the header, and want to replace the first one by VALUE=32, you would do: % replacekey -k "VALUE" -v "32" -K "HISTORY" myfile.fits OPTIONS
-k or --key key To provide the new keyword. -K or --old key To provide the old keyword. -v or --val val To provide the new value. -c or --com com To provide the new comment. SEE ALSO
hierarch28 to convert HIERARCH ESO keywords to regular 8-char keywords. FILES
Files shall all comply with FITS format BUGS
Modifications are so far only possible in the main header, not in the extensions. 28 Oct 1999 replacekey(1)

Check Out this Related Man Page

dfits(1)						      General Commands Manual							  dfits(1)

NAME
dfits - display FITS file header information SYNOPSIS
dfits [-x xtnum] <list> dfits [-x xtnum] - DESCRIPTION
dfits displays FITS header informations on stdout. Header information can be found in the main header only (default), in extensions, or in both. See the -x option below. dfits accepts multi-file input. 'dfits -' expects single file data coming from stdin. dfits also accepts now 'HDR' files. These are identified from the fact that they contain a line feed in one of the 80 first characters. OPTIONS
-x xtnum Specifies the extension to print out. Extensions are numbered starting from 1. If this option is not specified, only the main header is printed out. If this option specifies an extension that does not exist, nothing is printed out. Specify 0 as extension number to get a print of the main header plus all extension headers. Examples : dfits *.fits dfits *.fits | grep NAXIS3 gzip -d < star.fits.gz | dfits - | more dfits -x 0 *.fits dfits -x 3 *.fits SEE ALSO
fitsort can be combined with dfits output to sort out keyword values of a group of FITS files. FILES
Files shall all comply with FITS format 30 Mar 2000 dfits(1)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to cat a file , name starts with "-" ?

I have a question - beginning user, just learning unix. I have a file that name starts with a hypen -, such as a name like : -myfile (yes, I know shold not start files names like this, but this is the question I have to figure out, and its driving me nuts) I know that this hyphen is like... (9 Replies)
Discussion started by: HikerLT
9 Replies

2. Programming

PIpe Spy

Im trying to get my program to behave in this way: prog 1 | ./pipespy myfile.dat | prog2 the standard output of prog1 is supplied as the input to prog2 and copied into file myfile.dat. need help (11 Replies)
Discussion started by: jodders
11 Replies

3. Shell Programming and Scripting

Command output to a variable.

With cut -c 8-13 myfile, I am getting some numeric value. In my shell script I am trying to assign something like this, var=cut -c 8-13 myfile But at the time of execution I am getting -c is not found. If I dont assign, then script executes well. Can we not simply use the value from one... (8 Replies)
Discussion started by: videsh77
8 Replies

4. UNIX for Dummies Questions & Answers

rlogin issues

hi i got 3 boxes, boxA, boxB, boxC i can do the below boxA> ufsdump 0fu boxB:/mydirectory/myfile /myfile boxA> rlogin boxB is okay but when i do the below boxA> ufsdump 0fu boxC:/mydirectory/myfile /myfile, system says error, boxA> rlogin boxC got error on... (5 Replies)
Discussion started by: yls177
5 Replies

5. IP Networking

The "right" Way to Configure Reverse Zones?

I'm not sure where this really fits in the Unix.com forums, but this seemed to be a good spot for it. If not, please let me know: I've been trying to track down an issue that I've had for quite a while with reverse lookups. I've got a primary and secondary DNS that are authoritative for some... (8 Replies)
Discussion started by: deckard
8 Replies

6. Shell Programming and Scripting

Double Substitution variables in ksh

Hi I have a variable whose value is like this i=/test/test1/test2/myfile.cd.070505123457 i would like to have the value of myfile.cd stored into another variable my attempt is test=${i##*/} ;echo $test ##and i get myfile.cd.070505123457 since what i wnat is myfile.cd i try this... (19 Replies)
Discussion started by: xiamin
19 Replies

7. Shell Programming and Scripting

Eval command help

I have file called myfile which has the text "myserver" in it. I need to have a command to ping "myserver". How would I do that? I tried when I type at the terminal I get the output as . How do I do something like a ? thanks, Nick (5 Replies)
Discussion started by: nikhilfake
5 Replies

8. Shell Programming and Scripting

How to replace the last pattern using sed?

myfile: AAAaaa BBBbbb CCCccc AAAeee DDDddd how to replace the last AAA as EEEEE using sed? like this: AAAaaa BBBbbb CCCccc EEEEEeee DDDddd (14 Replies)
Discussion started by: vistastar
14 Replies

9. Shell Programming and Scripting

How can i use sed to replace a keyword in an xml file?

Hello Unix gurus! I'm a unix newbie. Can I use sed to replace a keyword in an xml file and convert this keyword with an output of a unix cat command? for example: <test>keyword</test> and temp.txt = hello! I would like to replace "keyword" with the output of "cat temp.txt". I think... (6 Replies)
Discussion started by: 4dirk1
6 Replies

10. Shell Programming and Scripting

splitting value

Hello, i want to take a one word from my file. -- myfile.txt -- test blablabla suPHP_ConfigPath /home/performe/etc blablabla etc. bla bla. -- myfile.txt -- How can i take performe from this file ? Thank you. (7 Replies)
Discussion started by: SAYGIN
7 Replies

11. Programming

Conditional replace after reading in a file

I need to read the contents of a file. Then I need to grep for a keyword and replace part of the grepped line based on the condition of previous and present line. Example input file: V { port1 = P; port2 = 0; shift_port = P0; /* if next shift_port is P0 I need... (7 Replies)
Discussion started by: naveen@
7 Replies

12. Shell Programming and Scripting

Grab data between 2 keywords any do an array operation and write the file intact

Hi Unix Gurus, I need to grep for a block that is between a start and end keyword and then in between I need to find and replace a keyword. for eg: I need to search between Test = 000; and Test = 000; and find K9 and replace with M9 INPUT FILE Define { Replace = K9; Test =... (6 Replies)
Discussion started by: naveen@
6 Replies

13. Shell Programming and Scripting

Search for a Keyword in file and replace another keyword or add at the end of line

Hi I want to implement something like this: if( keyword1 exists) then check if(keyword2 exists in the same line) then replace keyword 2 with New_Keyword else Add New_Keyword at the end of line end if eg: Check for Keyword JUNGLE and add/replace... (7 Replies)
Discussion started by: dashing201
7 Replies

14. Shell Programming and Scripting

How to replace the 10th column?

how to replace the 10th colum? Each line begins similarly, but they all ends variously. Col1,Col2,Col3,Col4,Col5,Col6,Col7,Col8,Col9,Col10,Col11,Col12,Col13,Col14,Col15,Col16,Col17 2015/03/14 15:00:04,2015/03/14 15:00:04,0,Server05,Omega-God,Beta_G,101011247,1,1,24,7,0,,339083645,1,1,... (9 Replies)
Discussion started by: ooilinlove
9 Replies

15. Ubuntu

[: too many arguments

line 5: #!/bin/bash old=$(du -sh /home/andy/Downloads/myfile.iso) while true; do new=$(du -sh /home/andy/Downloads/myfile.iso) if ; then break fi old=$new xdotool getactivewindow key Ctrl sleep 5 done line 5: bash - Meaning of " (square brackets)... (9 Replies)
Discussion started by: drew77
9 Replies