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
Unique value added garric Shell Programming and Scripting 2 05-18-2008 08:20 AM
Game: Name this person reborg What's on Your Mind? 268 09-03-2007 09:47 AM
Another person that needs Internet help vikster007 SUN Solaris 10 07-01-2005 03:59 PM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 04-13-2006
wcarp05 wcarp05 is offline
Registered User
  
 

Join Date: Apr 2006
Location: I live in the Sunset District of San Francisco.
Posts: 1
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
 

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 09:48 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