The UNIX and Linux Forums  

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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unique value added garric Shell Programming and Scripting 2 05-18-2008 04:20 AM
Game: Name this person reborg What's on Your Mind? 268 09-03-2007 05:47 AM
Another person that needs Internet help vikster007 SUN Solaris 10 07-01-2005 11:59 AM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-13-2006
Registered User
 

Join Date: Apr 2006
Location: I live in the Sunset District of San Francisco.
Posts: 1
Stumble this Post!
New Person Added to the Forum

Hello,

I'm brand new to this forum. I am working on my first Bash shell script. We were given an exercise to get ready for the real assignment. I could use some help.

The exercise is to "set two variables (i. e., file1 & file2) on the command line to the paths of the text files. We are to create a shell script that does the following:
"if either variable does not have a value, output a message and stop. file1=${file1:?must set file1} & file2=:?must set file2} is what I've composed so far.

The output : "There are ___________ lines total in the files. ________has __________% (files) as many __________. "

#I did this part. I typed in lines of text into both files. We are to use quota, echo, run tests, and edit/compose the script in the Vi editor.

The process of doing this is a bit confusing to me.
First I set variables.
Second, I create paths w/text.
Third, I export files.
Fourth, run tests.
Fifth name script files in Vi.

What does $SHELL do?

Can someone model this entire process for me so that I can get a handle how to accomplish the basics of using vi and writing a script?

I would be greatful!

Sincerely,

William Carpenter
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 04-13-2006
RTM's Avatar
RTM RTM is offline
Hog Hunter
 
Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
Stumble this Post!
William - please read the rules
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:59 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0