Re: Reading files
From: William Park (opengeometry@yahoo.ca)
Date: 04/15/03
- Next message: rakesh sharma: "Re: Backwards CUT"
- Previous message: William Park: "Re: Process one line of file at a time as a variable in a script?"
- In reply to: ricky: "Reading files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: William Park <opengeometry@yahoo.ca> Date: 15 Apr 2003 17:35:26 GMT
ricky <rkreidl@wi.rr.com> wrote:
> I have a file that has two columns of data separated by a space. How
> would you go about reading the file and storing each field in a
> different array variable.
> example file below. This file has 5 records and 2 fields in each
> record. I want to store each field in a separate variable. This is to
> be written in Korn shell.
>
> File
> ========
>
> absddsad effdsfer
> fe43wfsdsds dsddsf3
> dsdse2eds 343fdsd3
> sdsds dsfsdf4r33
> sdassa er353fds
>
> thanks
var1=( `awk '{print $1}' file` )
var2=( `awk '{print $2}' file` )
-- William Park, Open Geometry Consulting, <opengeometry@yahoo.ca> Linux solution for data management and processing.
- Next message: rakesh sharma: "Re: Backwards CUT"
- Previous message: William Park: "Re: Process one line of file at a time as a variable in a script?"
- In reply to: ricky: "Reading files"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|