Absurd Minds

More than 100 years without a motto.
It is currently 15 Jun 2024 11:03

All times are UTC-04:00

Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 05 Nov 2016 17:34 
User avatar

Joined: 09 May 2016 21:04
Posts: 99
Location: USA
I really need help with this programming assignment lol.
This is my first time ever scripting in BASH.

prompt: http://www.jeangourd.com/classes/csc222 ... pt-1/1.pdf

~ heemer | the internet hobo


PostPosted: 05 Nov 2016 21:48 
User avatar

Joined: 24 Feb 2015 09:39
Posts: 1081
What exactly do you need help with? Understanding the concept or something like that?

First, you should familiarize yourself with what wc actually does: http://www.computerhope.com/unix/uwc.htm. It has quite a bit of functions for it. Also, "man" is your friend: http://pastebin.com/AfdZYZp8

I will try my best without giving you a direct answer, because school is school.
  • For the first function, you have to count how many lines something is. There is a special char that dictates the newline function.
  • As for the second, you have to read from a file and output how many lines is in there. Same principle as from above.
  • As for the third, you basically mimic the second except with a file name.
  • The fourth is also much like the second and third, however its an array of file names. So with that, just execute the third method for every file provided.
  • The fifth is a simple help line. This is a basic return statement that displays information on how to use the command. Also, "-h" is synonymous to "--help".
Hope this helps.


Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC-04:00

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited