The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Help required with a Csh script to read data from a file fizzme Shell Programming and Scripting 1 05-29-2008 07:30 PM
Post Shell programming: Question about source a file and read data from the file ccwq Shell Programming and Scripting 3 08-04-2007 10:28 PM
Read from data file fongthai Shell Programming and Scripting 12 02-27-2007 09:22 PM
read/writte/input data in file. dorek Shell Programming and Scripting 0 06-22-2006 07:31 AM
Read data from a file into a variable yorkdg Shell Programming and Scripting 2 12-09-2004 05:29 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-29-2008
rejirajraghav rejirajraghav is offline
Registered User
  
 

Join Date: Mar 2008
Posts: 3
Need to read data from a file (cut/awk)

Hi list,
i have an orcale spool file with

SQL> select COMPMAP as SVC, ITEM, UNIT, sum(JAN), sum(FEB)
SVC ITE U SUM(JAN) SUM(FEB)
------ --- - ---------- ----------
401500 IOC Q 14 14
406200 LC Q 1 1
410124 IOC Q 5 4
410124 LC Q 11 8
410132 IOC Q 230 229
410148 IOC Q 5 5
410148 LC Q 11 11
410156 IOC Q 116 116
410156 LC Q 2038 2031
410164 IOC Q 68 69
410164 LC Q 14 14


following. I need to read the file and store the value of SUM(JAN) and SUN(FEB) in two array. Please suggest howcan i achive this. cut/awk which will be the best??
  #2 (permalink)  
Old 04-29-2008
fabtagon fabtagon is offline
Registered User
  
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 189
What kind of array is your target format? An array in some shell script language, do you mean a specific file format, ... ? Why do you select all the other values you don't need?
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0