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
crontab programing petroleo HP-UX 2 03-05-2008 08:05 AM
Editing files in shell programing nir_s Shell Programming and Scripting 0 07-13-2005 04:53 AM
mutex in shell programing zz_xm Shell Programming and Scripting 1 03-09-2005 10:53 PM
Win programing D.Borak High Level Programming 1 03-19-2002 08:38 PM
Graphics programing Sebastyan UNIX Desktop for Dummies Questions & Answers 1 02-27-2002 08:09 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-05-2008
SoCalledEngr SoCalledEngr is offline
Banned
  
 

Join Date: Mar 2008
Posts: 2
Awk Programing (need help)

plx help to solve these problems??

1. Create a HERE document which will edit multiple files in the same directory, using the ed editor. I give you 3 original files: file1.c , file2.c , file3.c, download them and change each string "stdio.h" to "STDIO.H" in these files. Note: when execute the shell file, you should change all of C files. You do not need execute it several times. Only Submit the shell script file and result files.
2. Consider the file normal.precip.txt. It contains the average amount of rainfall over a 30 year period for about 275 cities in North America. The first line of the file is a header, which tells you what each column contains. Basically, each line contains a city name, the state the city is in, and then average rainfall amounts from January through December, and then an annual average for all months. The file is TAB delimited. QUESTION: What is the total average amount of rainfall, in inches, for the month of January, for the following states: California (CA), Texas (TX), Alaska (AK). I want individual totalized averages for each of the above states for the month of January. As a check on your algorithm, note that the totalized average rainfall for California (CA) for the month of February over the same period was 2.65067. This was derived by adding the rainfall values together for all cities in California for the month of February, and simply taking their average.
Please use Awk programming to implement above procedure.
  #2 (permalink)  
Old 03-05-2008
vgersh99's Avatar
vgersh99 vgersh99 is online now Forum Staff  
Moderator
  
 

Join Date: Feb 2005
Location: Boston, MA
Posts: 5,121
Please read the Rules of these forums - no homework.
Thread closed.
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 04:38 AM.


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