#Contents of file 1 are:
Dec 10 12:33:44 User1 Interface: Probe
Dec 10 12:33:47 uSER1 SOME DATA
Dec 10 12:33:47 user1 Interface: MSGETYPE
Dec 10 12:34:48 user1 ID: 10.
Dec 10 12:33:55 user1 Interface: MSGTYPE
Dec 10 12:33:55 user1 Id: 9
Dec 10 13:09:44 user1 Method: Push down
Dec 10 13:16:15 User1 Idlist: 12:10:102:100
I should parse this file and retrieve only MSGETYPE. The output is as shown below.
Code:
Dec 10 12:33:55 user1 Interface: MSGTYPE
Dec 10 12:33:55 user1 Id: 9
Dec 10 13:09:44 user1 Method: Push down
Dec 10 13:16:15 User1 Idlist: 12:10:102:100
The file will contain many MSGTYPE but it should parse only the above output lines.
Folks,
I have a bit of an issue trying to obtain some data from a csv file using PERL. I can sort the file and remove any duplicates leaving only 4 or 5 rows containing data. My problem is that the data contained in the original file contains a lot more columns and when I try ro run this script... (13 Replies)
Dear All,
I have a comma-separated file.
1. The first line of the file(header) should have 4 commas(5 fields).
2. The last line of the file should have 1 comma(2 fields).
Pls help me in checking this condition in a shell script.
And the number of lines between the first line and last... (11 Replies)
Hi All,
Im having a file named logserver.txt. I want a perl script to take a backup of that file, along with the datestamp; move the file to a different location or empty the contents of the file after backup.
Remember, the file gets generated when the related service starts. My condition is... (14 Replies)
hi all,
i am facing this problem ,please help.
suppose a file contains conetnts as below:
john itemspurchased/date
john itempurchased/date
james itempurchased/date
john items purchsed/date
so here i want to store john only once in a variable but retreive his 3... (5 Replies)
Hi
My requirement is to read the contents of a fixed length file and validate the same.
But am not able to read the contents of the file and when i tried it to print i get <blank> as an output...
I used the below satatements for printing the contents
... (3 Replies)
Hi,
I'm trying to read the contents of a file (message.txt), put them in a mail and then mail it
This is what I have thus far but I having trouble referencing the file. I'm trying to put it into an array so any ideas would be helpful ...
$to='user.n@domain.com';
$from= 'username';... (7 Replies)
I am looking to create a perl script which will take numbers from a simple text file, convert them from decimal to hex, and then rewrite those values in the file or create a new file with the hex numbers(whichever's easier).
My text document for example would be something as simple as
1312... (6 Replies)
Hi,
I want to split/parse certain bits of the hex data into another field.
Example:
Input data is
Word1: 4f72abfd
Output:
Parse bits (5 to 0) into field word1data1=0x00cd=205 decimal
Parse bits (7 to 6) into field word1data2=0x000c=12 decimal
etc.
Word2: efff3d02
Parse bits (13 to... (1 Reply)
I have an input file attached that I am trying to parse in tab-delimanted format:
The chromosomal variant column contains all the information:
parse rules:
1. 4 zeros after the NC_ and the digits before the .
2. digits after the g. repeated twice separated by a tab
3. letter before the >
4.... (10 Replies)
Below is a perl code I am trying.
#!/usr/bin/perl
#use strict;
use warnings qw/ all FATAL /;
use constant ENV_FILE => '/apps/env_data.txt';
$uenv = $ARGV;
my $input = $uenv;
open my $fh, '<', ENV_FILE
or die sprintf qq{Unable to open "%s" for input: $!}, ENV_FILE;
... (2 Replies)
Discussion started by: Tuxidow
2 Replies
LEARN ABOUT DEBIAN
imgsc
imgsc(1) General Commands Manual imgsc(1)Name
imgsc - Find HST GSC stars in FITS or IRAF image files
Synopsis
imgsc [options] FITS or IRAF file(s)
Description
Search the HST Guide Star Catalog withing the area described by the world coordinate system in an image header. This is a link to imcat
rather than a separate executable.
Options-b [<RA> <Dec>]
Output in B1950, optional new image center in B1950 (FK4) RA and Dec
-c <name>
Reference catalog (gsc, ujc, or tab table file
-g <class>
Guide Star Catalog class (-1=all,0,3 (default -1)
-h Print heading, else do not
-j [<RA> <Dec>]
Output in J2000, optional new image center in J2000 (FK5) RA and Dec
-m [<bright magnitude>] <faint magnitude>
Limiting catalog magnitude(s) (default none, bright -2 if only faint is given)
-n <num>
Number of brightest stars to print
-p <scale>
Initial plate scale in arcsec per pixel (default 0)
-s Sort by RA instead of flux
-t Tab table to standard output as well as file
-v Verbose listing of processing intermediate results
-w Write tab table output file imagename.cat -z Use AIPS classic projections instead of WCSLIB; use CD matrix or CDELT instead of poly-
nomial solution.
See Also
imcat(),imuac(),imusac(),scat()
Author
Doug Mink, SAO (dmink@cfa.harvard.edu)
14 April 1998 WCS imgsc(1)