Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Linux question, writing small script afp://blue.cs.sonoma.edu In Lab. No 1 we ma

ID: 3838347 • Letter: L

Question

Linux question, writing small script

afp://blue.cs.sonoma.edu

In Lab. No 1 we made calls to the Internet Chuck Norris Data Base API using curl. Write a script that takes a joke number as an argument and prints the joke to the screen. For example, if your script is called chuck.sh, then you should have the following output: [you@blue final]$ ./chuck.sh 458 Chuck Norris can write infinite recursion functions and have them return. [you@blue final]$ ./chuck.sh 459 Chuck Norris can solve the Towers of Hanoi in one move. [you@blue final]$ ./chuck.sh 460 The only pattern Chuck Norris knows is God Object.

Explanation / Answer

open vi editor then declare the following:

#!/bin/bash

clear

echo "Chuck Noris can write infinite recursion function and then return."

save this file as chuck.sh 458

Similarly,

open vi editor then declare the following:

#!/bin/bash

clear

echo "Chuck Noris can solve the Towers of Hanoi in one move."

save this file as chuck.sh 459

Similarly,

open vi editor then declare the following:

#!/bin/bash

clear

echo "The only pattern Chuck Noris knows is God Object."

save this file as chuck.sh 460

give permission to all the scripts with command chmod 755 chuck.sh 458 chuck.sh 459 chuck.sh 460

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote