Computers and Technology
Computers and Technology, 21.12.2019 01:31, antcobra

The shell expands $0 to the name of the calling program (sobell, page 461), $1–$n to the individual command-line arguments (positional parameters; sobell, page 462), $* (sobell, page 465) to all positional parameters, and $# (sobell, page 466) to the number of positional parameters.1. write a script named all that displays (sends to standard output) the name of the calling program, the number of positional parameters, and a list of positional parameters. include the #! line (sobell, page 287) and a comment (sobell, page 288). remember to make the file executable (sobell, page 100). test the script with 0, 1, and 5 positional parameters.2. make a symbolic link (sobell, page 113) named linkto to the all script you wrote in the previous step. call linkto with two arguments. what does the script report as the name it was called as? 3. write a script named myname that uses echo (most of the examples in chap- ter 10 use this utility) to prompt the user with enter your name: , reads into a variable the string the user types in response to the prompt, and then dis- plays hello followed by the string the user typed. when you run the program it should look like this: $ ./myname enter your name: max wild hello max wild4. rewrite myname from the previous step, calling it myname2. have this version of the program prompt the user for a string, but instead of displaying hello and the string on the screen (sending it to standard output) redirect the output so the program writes only the string the user entered (and not hello) to the temporary file named pid. name where pid is the process id number (sobell, page 467) of the process running the script. display the contents of the pid. name file.5. write and run a script named looper that uses the for (sobell, page 434) control structure to loop through the command-line arguments and display each argument on a separate line.6. rewrite looper from the previous step, calling it looper2. have this version of the program use the control structure (sobell, page 432) to perform the same task.7. write a script named ifthen that prompts the user with > > and reads a string of text from the user. if the user enters a nonnull string, the script displays you entered: followed by the string; otherwise it displays where is your input? . use an control structure (sobell, page 424) to imple- ment the two-way branch in the script. use the test (sobell, pages 420 and 978) builtin to determine if the user enters a null string. what do you have to do to avoid getting an error message when you prompt with > > ? (there are several ways to construct the test statement.)8. write and run a simple shell script named echomyvar that displays the pid (sobell, page 467) of the process running the script and value of the variable named myvar. display the pid of the interactive shell you are working with. what is the value of the variable within the process running the shell script? are the interactive shell and the shell running the script run by the same or different processes (do they have the same pid)?

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 06:00, Wolfie215
Which of the following is a way that advancements in technology improve humans' ability to measure air quality and protect human health? a. air quality data gathered by new instruments can be used to reduce exposure to pollutants. b. new technologies enable natural and human-made pollution sources to be located and monitored. c. air quality data gathered by new instruments can be used to predict trends in pollution over time. d. new technologies allow governments to make informed decisions about the regulation of pollution. (choose more than one)
Answers: 2
image
Computers and Technology, 22.06.2019 15:00, yeet74
I'm taking a class on how to make a movie, and it offers some apps that would be in the process. the thing is, i don't have any of those ha. if you have any tips on some apps i could use, that would be awesome. i don't have an iphone, so don't suggest any apps like imovie. i know that this is a weird question, but it would be super for me. : )
Answers: 2
image
Computers and Technology, 24.06.2019 00:00, Kaylaonfleek0956
Consider the series where in this problem you must attempt to use the ratio test to decide whether the series converges. compute enter the numerical value of the limit l if it converges, inf if it diverges to infinity, minf if it diverges to negative infinity, or div if it diverges but not to infinity or negative infinity.
Answers: 1
image
Computers and Technology, 24.06.2019 07:30, isabelgalvarado2838
Jason is working on a microsoft excel worksheet and he wants to create a print preview shortcut. his teacher asks him to access the customization option to create the new shortcut. which two tabs should jason select to place the print preview shortcut on the worksheet toolbar? a. new tab (custom) and new group (custom) b. new file tab (custom) and new tab (custom) c. new custom group and new command d. new custom tab and new command
Answers: 2
Do you know the correct answer?
The shell expands $0 to the name of the calling program (sobell, page 461), $1–$n to the individual...

Questions in other subjects:

Konu
Biology, 09.11.2020 03:00
Konu
Mathematics, 09.11.2020 03:00