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
ksh scripting help praveenbvarrier Shell Programming and Scripting 1 04-15-2008 10:19 AM
sql scripting help sam786 Shell Programming and Scripting 3 12-10-2007 12:31 PM
difference between AIX shell scripting and Unix shell scripting. haroonec Shell Programming and Scripting 2 04-12-2006 08:12 AM
scripting guru's pls help me with scripting on AIX thatiprashant Shell Programming and Scripting 1 01-20-2006 07:58 PM
Scripting? woofie What's on Your Mind? 1 03-09-2005 07:03 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 09-28-2004
adawg1283
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Unhappy HELP! Need HELP scripting!

HELP! I have to write a basic UNIX shell that will read in a file, and print out the number of words in the file. I need to create a system that will take a file and output information to standard out (the screen) about the number of words in a file. A word is defined as characters delineated by standard white spaces. I have to have a "driving" shell script named worfo and will use system commands and utilities. Also, my system has to do the following extra's:

Accept the option -n, meaning to use all non-alpha characters to delimit words

Accept the option -u, meaning to only count unique words

I am having problems starting out on how to do this! Any advice and help is GREATLY appreciated!
  #2 (permalink)  
Old 09-29-2004
adawg1283
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Unhappy need help scripting!

HELP! I have to write a basic UNIX shell that will read in a file, and print out the number of words in the file. I need to create a system that will take a file and output information to standard out (the screen) about the number of words in a file. A word is defined as characters delineated by standard white spaces. I have to have a "driving" shell script named worfo and will use system commands and utilities. Also, my system has to do the following extra's:

Accept the option -n, meaning to use all non-alpha characters to delimit words

Accept the option -u, meaning to only count unique words

I am having problems starting out on how to do this! Any advice and help is GREATLY appreciated!
  #3 (permalink)  
Old 09-29-2004
svennie svennie is offline
Registered User
  
 

Join Date: Sep 2004
Posts: 78
Arrow search in the forum

to sum it up - read file, word count, read input, make case loop....I mean, the whole soultion is here in the forum. You only have to search. first try then ask.....
  #4 (permalink)  
Old 09-29-2004
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
This sounds like a mid-level college CS course assignment.
We don't give homework answers, but the the source code for 6494 different shells is at:

http://freshmeat.net/browse/164/
  #5 (permalink)  
Old 09-29-2004
adawg1283
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Unhappy

Yes, this is a college assignment, and I'm not looking for actual code. Just how to go about starting it off because I have NO idea!
  #6 (permalink)  
Old 09-29-2004
beilstwh beilstwh is offline
Registered User
  
 

Join Date: Jul 2004
Location: New York State
Posts: 65
check out the utility wc. And thats all the help you get.
  #7 (permalink)  
Old 09-29-2004
auswipe's Avatar
auswipe auswipe is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Wide Awake Wylie, Texas
Posts: 535
This smells a lot like homework...
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:25 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