Within a shell script, the shell expands $1 (a variable called a positional parameter; Sobell, page 475) to the first argument on the command line the script was called with. Write and execute a script named first that displays (sends to standard output) the first argument on the command line it was called with. Include the #! line and a comment. Remember to make the file executable.

What will be an ideal response?


$ cat first
#!/bin/bash
#
# This script sends its first argument to standard output
#
echo $1
$ ./first Hello
Hello

Computer Science & Information Technology

You might also like to view...

An error that occurs while an application is running is called a(n) ____.

A. bug B. runtime upset C. exception D. inception

Computer Science & Information Technology

Satellite broadband connections require the use of a(n) ________, which is placed outside the home and connects to your computer with coaxial cable

Fill in the blank(s) with correct word

Computer Science & Information Technology

A window that suddenly displays, usually contains a menu of commands, and stays on the screen until the user selects one of the commands

a. pop-up window b. modal window c. opening window

Computer Science & Information Technology

To create a meeting, on the ____ tab, in the New group, click the New Meeting button.

A. Home B. Meeting C. Insert D. File

Computer Science & Information Technology