Sponsored Content
Top Forums Shell Programming and Scripting Setting local vars from a header rec in another file? Post 79269 by ecupirate1998 on Tuesday 26th of July 2005 12:59:17 PM
Old 07-26-2005
more info

I'm hoping this is a good way to code this. Any comments?

read var < sfgr0031.dat


echo $var

v1=`echo $var | cut -c 1-14`
v2=`echo $var | cut -c 15-22`
v3=`echo $var | cut -c 23-29`

echo $v1
echo $v2
echo $v3

Last edited by ecupirate1998; 07-26-2005 at 03:33 PM..
 

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
GETINFO(1)						      General Commands Manual							GETINFO(1)

NAME
getinfo - get header information from a RADIANCE file SYNOPSIS
getinfo [ -d ][ file .. ] getinfo - DESCRIPTION
Getinfo reads the header of each RADIANCE file and writes it to the standard output. Octree and picture files are in a binary format, which makes it difficult to determine their content. Therefore, a few lines of text are placed at the beginning of each file by the RADI- ANCE program that creates it. The end of the header information and the start of the data is indicated by an empty line. The -d option can be used to print the dimensions of an octree or picture file instead. For an octree, getinfo -d prints the bounding cube (xmin ymin zmin size). For a picture, getinfo -d prints the y and x resolution (-Y yres +X xres). If no file is given, the standard input is read. The second form of getinfo with a hyphen simply removes the header and copies the body of the file from the standard input to the standard output. EXAMPLE
To print the header information from scene1.oct and scene2.hdr: getinfo scene1.oct scene2.hdr AUTHOR
Greg Ward SEE ALSO
oconv(1), pfilt(1), rhinfo(1), rpict(1), rvu(1) RADIANCE
1/15/99 GETINFO(1)
All times are GMT -4. The time now is 11:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy