Sponsored Content
Top Forums Shell Programming and Scripting Setting local vars from a header rec in another file? Post 79152 by vino on Tuesday 26th of July 2005 12:20:43 AM
Old 07-26-2005
An approach I picked up from this post.

Look at Perderabo's solution.

20050719hhmmsssfgr00310000537000000000000000

If the orientation of data presented in that header information is always the same, then, why dont you look for the first n characters, or n characters starting from k-th postion etc.

Vino
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Send/Rec files via modem..

Ok, here is my situation. I need to send/rec files to different outside sources. A developer working on this couldn't find a unix program to dial out so he is going to go with a 3rd party software on a NT box. eww So, this is what I'm looking for. I would have a modem on a sun/linux/hp box and... (1 Reply)
Discussion started by: natter
1 Replies

2. Shell Programming and Scripting

how to reformat a file to 80 byte rec length?

I have a variable length file that needs to be reformatted to 80 byte reclen before I ftp it to a customer. What is the best way to do this? I tried using dd if=inputfile of=outputfile conv=noblock cbs=80, and it almost gives me what I need. The output file needs to be 80-byte records, and the last... (4 Replies)
Discussion started by: cmgarcia
4 Replies

3. Linux

Reading the header of a tar file(posix header)

say i have these many file in a directory named exam. 1)/exam/newfolder/link.txt. 2)/exam/newfolder1/ and i create a tar say exam.tar well the problem is, when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories. on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies

4. Shell Programming and Scripting

Set lines of in a file to seperate vars

In a bash script, I'm looking for a way to set each matching line of a file into its own variable, or variable array. As an example, i have a crontab file with several entries: 00 23 * * * /usr/local/bin/msqlupdate -all 00 11 * * * /usr/local/bin/msqlupdate -inc 00 03 * * *... (2 Replies)
Discussion started by: lochraven
2 Replies

5. Solaris

Setting up local DNS Server

Hi , Could some one please share some docs or steps to set up solaris box as a local DNS . Thx (1 Reply)
Discussion started by: skamal4u
1 Replies

6. Shell Programming and Scripting

Comparing one file header with another file header

Hi Experts, In our project we have requirement where in we have to compare header of one file with header in the parameter file. There are 20 files which we ftp from one site. All this files have different header. We are comapring this file with our parameter file(which is having the header... (2 Replies)
Discussion started by: Amey Joshi
2 Replies

7. AIX

Setting up Local printer AIX 5

Hi folks need some help here. We have a RS6000 running AIX. It is almost never used anymore, but we need to print off some data. I have a paralell printer conected to the parrallel port, but have no idea where to go from here. The printer was originall named named LP01. If the users telnetinto the... (2 Replies)
Discussion started by: prator
2 Replies

8. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies
HTTP::OAI::Record(3pm)					User Contributed Perl Documentation				    HTTP::OAI::Record(3pm)

NAME
HTTP::OAI::Record - Encapsulates an OAI record SYNOPSIS
use HTTP::OAI::Record; # Create a new HTTP::OAI Record my $r = new HTTP::OAI::Record(); $r->header->identifier('oai:myarchive.org:oid-233'); $r->header->datestamp('2002-04-01'); $r->header->setSpec('all:novels'); $r->header->setSpec('all:books'); $r->metadata(new HTTP::OAI::Metadata(dom=>$md)); $r->about(new HTTP::OAI::Metadata(dom=>$ab)); METHODS
$r = new HTTP::OAI::Record( %opts ) This constructor method returns a new HTTP::OAI::Record object. Options (see methods below): header => $header metadata => $metadata about => [$about] $r->header([HTTP::OAI::Header]) Returns and optionally sets the record header (an HTTP::OAI::Header object). $r->metadata([HTTP::OAI::Metadata]) Returns and optionally sets the record metadata (an HTTP::OAI::Metadata object). $r->about([HTTP::OAI::Metadata]) Optionally adds a new About record (an HTTP::OAI::Metadata object) and returns an array of objects (may be empty). Header Accessor Methods These methods are equivalent to "$rec->header->$method([$value])". $r->identifier([$identifier]) Get and optionally set the record OAI identifier. $r->datestamp([$datestamp]) Get and optionally set the record datestamp. $r->status([$status]) Get and optionally set the record status (valid values are 'deleted' or undef). $r->is_deleted() Returns whether this record's status is deleted. perl v5.12.4 2011-06-23 HTTP::OAI::Record(3pm)
All times are GMT -4. The time now is 10:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy