Solved

finding out the number of parameters entered

Posted on 2004-08-22
2
200 Views
Last Modified: 2010-04-21
hi, i would like to know how i can echo to screen the number of parameters entered in a bourne shellscript program

ie. if the person types "hello hello hello hello hello" i want it to echo to screen "5 parameters were entered"

any help appreciated, thanks
0
Comment
Question by:seremaz
2 Comments
 
LVL 11

Accepted Solution

by:
avizit earned 125 total points
ID: 11864229
#!/usr/bin/sh

echo "$# parameters were entered"

0
 

Author Comment

by:seremaz
ID: 11864236
i already figured this out, but as you answered me right ill give u the points anyway :p
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question