08-31-2010
Thank you, Agama for clearing that up. when I run it as a bash script using test_file.txt, it runs and produces no output. Nor does it produce errors.
Here are a couple of lines of the test_file.txt:
* [44]Amateur Astronomy and Space Website - Images, CCD information,
buy and sell, and links.
* [45]Ask an Astronomer - Questions answered by graduate students,
including a question and answer archive, information on the solar
system, the universe, SETI, observational astronomy, careers and
history.
* [46]Astro World - Provides studies, images, movies, and equations.
* [47]Astronomical Observatory - Visual and CCD photomety, including
classic and digital astrophotography. Presents equipment and
resources. Located near Plomin in eastern Istria, Croatia.
* [48]Astronomy Awards - Supporting the hobby related web sites
throughout world.
* [49]Astronomy Boy - Getting started, CG-5 mount, SAA 100 list,
constellation portraits, barn door tracker, comet Hale Bopp,
homemade eyepieces, EQ mount tutorial, millennium rant, and
biography, home.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
suppose if u have a file like that
Hen ABCCSGSGSGJJJJK 15
Cock ABCCSGGGSGIJJJL 15
* * * * * * : * * * . * * * :
Hen CFCDFCSDFCDERTF 30
Cock CHCDFCSDHCDEGFI 30
* . * * * * * * * : * * :* : : .
The output shud be
where there is : and .
It shud... (4 Replies)
Discussion started by: cdfd123
4 Replies
2. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
3. Shell Programming and Scripting
Hi,
I need an awk command that would parse the below expression
Input Format
1 'Stmt1 ............................'2 'Stmt2 ............................'3 'Stmt3 ............................'4 'Stmt4 ............................'5 'Stmt5 ............................'6 'Stmt6... (1 Reply)
Discussion started by: rajan_san
1 Replies
4. Shell Programming and Scripting
Hi folks,
I have XML files with the following sections (section occurs once per file) in them:
<AuthorList CompleteYN="Y">
<Author ValidYN="Y">
<LastName>Bernal</LastName>
<ForeName>Federico</ForeName>
... (3 Replies)
Discussion started by: euval
3 Replies
5. Shell Programming and Scripting
Hi
I am trying to figure out the best way to search a long log file and print out certain information.
For example if I had a line in a log file delimited by ampersand
first_name=mike&last_name=smith&zip_code=55555&phone=555-5555&state=ma&city=boston
and I only wanted to search for and... (3 Replies)
Discussion started by: mstefaniak
3 Replies
6. Shell Programming and Scripting
Hello all gurus,
I have a long list of rules as below:
20 name:abc addr:203.45.247.247/255.255.255.255 WDW-THRESH:12 BW-OUT:10000000bps BW-IN:15000000bps STATSDEVICE:test247 STATS:Enabled (4447794/0) <IN OUT>
25 name:xyz160 addr:203.45.233.160/255.255.255.224 STATSDEVICE:test160... (3 Replies)
Discussion started by: sb245
3 Replies
7. Shell Programming and Scripting
Hi,
I have a quick question on parsing the hour/minute and value from a text file and remove the seconds portion. For example in the below text file:
20:26:01 95.83
20:27:01 96.06
20:28:01 95.99
20:29:01 7.11
20:30:01 5.16
20:31:01 8.27
20:32:02 9.79
20:33:01 11.27
20:34:01 7.83... (2 Replies)
Discussion started by: satishrao
2 Replies
8. Shell Programming and Scripting
I am trying using awk to open an input file and check a column 2/field $2 and if there is a warning then that is displayed (variantchecker): G not found at position 459, found A instead. The attached Sample1.txt is that file. If in that column/field there is a black space, then the text after... (6 Replies)
Discussion started by: cmccabe
6 Replies
9. Shell Programming and Scripting
Hello Friends!
I would like to help the masters ... I have a file with the entry below and would like a script for that output:
Input file:
001 1 01-20152142711532-24S 1637909825/05/2015BAHIA SERVICOS R F, ... (1 Reply)
Discussion started by: He2
1 Replies
10. Shell Programming and Scripting
I am trying to parse the input in awk to include the |gc= in $4 but am not able to. The below is close:
awk so far:
awk '{sub(/\|]+]++/, ""); print }' input.txt Input
chr1 955543 955763 AGRN-6|pr=2|gc=75 0 +
chr1 957571 957852 AGRN-7|pr=3|gc=61.2 0 +
chr1 970621 ... (7 Replies)
Discussion started by: cmccabe
7 Replies
LEARN ABOUT DEBIAN
astro::fits::header::ndf
Astro::FITS::Header::NDF(3pm) User Contributed Perl Documentation Astro::FITS::Header::NDF(3pm)
NAME
Astro::FITS::Header::NDF - Manipulate FITS headers from NDF files
SYNOPSIS
use Astro::FITS::Header::NDF;
$hdr = new Astro::FITS::Header::NDF( Cards => @cards );
$hdr = new Astro::FITS::Header::NDF( Items => @items );
$hdr = new Astro::FITS::Header::NDF( ndfID => $indf );
$hdr = new Astro::FITS::Header::NDF( File => $file );
$hdr->writehdr( $indf );
$hdr->writehdr( File => $file );
DESCRIPTION
This module makes use of the Starlink NDF module to read and write to an NDF FITS extension or to a ".HEADER" block in an HDS container
file. If the file is found to be an HDS container containing multiple NDFs at the top level, either the .HEADER NDF or the first NDF
containing a FITS header is deemed to be the primary header, and all other headers a subsidiary headers indexed by the name of the NDF in
the container.
It stores information about a FITS header block in an object. Takes an hash as an argument, with either an array reference pointing to an
array of FITS header cards, array of "Astro::FITS::Header::Item" objects, or a filename, or (alternatively) an NDF identifier.
Currently, subheader support is readonly.
METHODS
configure
Reads a FITS header from an NDF.
$hdr->configure( Cards => @cards );
$hdr->configure( ndfID => $indf );
$hdr->configure( File => $filename );
Accepts an NDF identifier or a filename. If both "ndfID" and "File" keys exist, "ndfID" key takes priority.
If the file is actually an HDS container, an attempt will be made to read a ".HEADER" NDF inside that container (this is the standard
layout of UKIRT (and some JCMT) data files). If an extension is specified explicitly (that is not ".sdf") that path is treated as an
explicit path to an NDF. If an explicit path is specified no attempt is made to locate other NDFs in the HDS container.
If the NDF can be opened successfully but there is no .MORE.FITS extension, an empty header is returned rather than throwing an error.
writehdr
Write a FITS header to an NDF.
$hdr->writehdr( ndfID => $indf );
$hdr->writehdr( File => $file );
Accepts an NDF identifier or a filename. If both "ndfID" and "File" keys exist, "ndfID" key takes priority.
Throws an exception (croaks) on error.
NOTES
This module requires the Starlink NDF module.
SEE ALSO
NDF, Astro::FITS::Header, Astro::FITS::Header::Item Astro::FITS::Header::CFITSIO
AUTHORS
Tim Jenness <t.jenness@jach.hawaii.edu>, Alasdair Allan <aa@astro.ex.ac.uk>, Brad Cavanagh <b.cavanagh@jach.hawaii.edu>
COPYRIGHT
Copyright (C) 2008-2009 Science & Technology Facilities Council. Copyright (C) 2001-2005 Particle Physics and Astronomy Research Council.
All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place,Suite 330, Boston, MA 02111-1307, USA
perl v5.14.2 2012-06-30 Astro::FITS::Header::NDF(3pm)