Sponsored Content
Top Forums Shell Programming and Scripting sed or awk to parse this text Post 302449531 by bulgin on Monday 30th of August 2010 11:25:27 PM
Old 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

To parse through the file and print output using awk or sed script

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

awk/sed Command : Parse parameter file / send the lines to the ksh export command

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

awk/sed Command: To Parse Stament between 2 numbers

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

parse xm entry with awk/sed

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

Use awk or sed to parse delimited string

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

sed/awk script to parse list of bandwidth rules

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

[solved] Awk/shell question to parse hour minute from text

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

awk to parse file and display result based on text

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

awk or sed? rows text to co

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

awk to parse field and include the text of 1 pipe in field 4

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
Astro::FITS::Header::AST(3pm)				User Contributed Perl Documentation			     Astro::FITS::Header::AST(3pm)

NAME
Astro::FITS::Header::AST - Manipulates FITS headers from an AST object SYNOPSIS
use Astro::FITS::Header::AST; $header = new Astro::FITS::Header::AST( FrameSet => $wcsinfo ); $header = new Astro::FITS::Header::AST( FrameSet => $wcsinfo, Encoding => 'FITS-IRAF' ); $header = new Astro::FITS::Header::AST( Cards => @cards ); DESCRIPTION
This module makes use of the Starlink::AST module to read the FITS HDU from an AST FrameSet object. It stores information about a FITS header block in an object. Takes an hash as an argument, with an array reference pointing to an Starlink::AST FramSet object. REVISION
$Id$ METHODS
configure Reads a FITS header from a Starlink::AST FrameSet object $header->configure( FrameSet => $wcsinfo ); Base class initialisation also works: $header->configure( Cards => @cards ); Accepts a reference to an Starlink::AST FrameSet object. If a specific encoding is required, this can be specified using the Encoding argument. Default is FITS-WCS if no Encoding is given. Note that not all framesets can be encoded using FITS-WCS. $header->configure( FrameSet => $wcsinfo, Encoding => "Native" ); If Encoding is specified but undefined, the default will be decided by AST. SEE ALSO
"Starlink::AST", "Astro::FITS::Header" AUTHORS
Alasdair Allan <aa@astro.ex.ac.uk>, Tim Jenness <t.jenness@jach.hawaii.edu> COPYRIGHT
Copyright (C) 2007-2011 Science and 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::AST(3pm)
All times are GMT -4. The time now is 01:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy