New Person Added to the Forum


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting New Person Added to the Forum
# 1  
Old 04-13-2006
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
# 2  
Old 04-13-2006
William - please read the rules
Login or Register to Ask a Question

Previous Thread | Next Thread

5 More Discussions You Might Find Interesting

1. What is on Your Mind?

Updated Forum Search Index Min Word Length to 2 Chars and Added Quick Search Bar

Today I changed the forum mysql database to permit 2 letter searches: ft_min_word_len=2 I rebuilt the mysql search indexes as well. Then, I added a "quick search bar" at the top of each page. I have tested this and two letter searches are working; but it's not perfect,... (1 Reply)
Discussion started by: Neo
1 Replies

2. Shell Programming and Scripting

Script executable only for one person at same time

Hi My question: Is there a way to lock a script if its already running for other users? Like if i want to start a script, that is running by another user, there will be a message: Hey, you cant start the script because its running by another user, try it later. my idea was that the... (10 Replies)
Discussion started by: DarkSwiss
10 Replies

3. What is on Your Mind?

Game: Name this person

Simple rules... 1. Guess who it is, the first person to get it posts the next picture, post your guess as a reply to this thread. 2. Wait for the person who posted the picture to confirm that you are correct before posting a new picture. 3. If the person who posted the picture does not answer... (268 Replies)
Discussion started by: reborg
268 Replies

4. Shell Programming and Scripting

Probably easy question for handy person!!!

I have given file with three columns,example: mm234 5 22 mn237 6 45 de987 4 41 I have to check for input values in second and third column and if it is not numeric I have to deleted using grep function. I keep trying. But help from pros might help me. We know that there is only one... (4 Replies)
Discussion started by: ljubayuu
4 Replies

5. Solaris

Another person that needs Internet help

Ok i have a router, which my sparc 5 is connected to. I can acess the router webpage (192.168.0.1). But I cant access the internet. When i use sys-unconfig i enter my ip address fine then i click none for when it asks me for DNS info because I dont have a domain. I was told i can manually change... (10 Replies)
Discussion started by: vikster007
10 Replies
Login or Register to Ask a Question