Question

1. Install the supplied bash script on the Kali Linux VM BASH filename :ipLAN In text...

1. Install the supplied bash script on the Kali Linux VM

BASH filename :ipLAN

In text editor looks like this

#!/bin/bash
is_alive_ping()
{
   ping -c 1 $1 >/dev/null 2 >&1
   [ $? -eq 0 ] && echo Node with IP: $1 is UP.
}
for i in 192.168.1.{1..255}
do
is_alive_ping $1 & disown
done

QUESTION:

  1. Install the supplied bash script on the Kali Linux VM

**NOte how do i install the above script in kali ,when i am doing it the output says bad inetrpreter no such file or directory **

My answer :

Chmod 777 ipLAN

./ipLAN

BUt the output is bad interpereter no such file or directory

0 0
Add a comment Improve this question Transcribed image text
Answer #1

save the file name as ipLAN.sh

change the permission to

$chmod 777 ipLAN.sh

now run the script on terminal

$./ipLAN.sh

NOTE: when type ./ipLAN withpout extension it will not recognize the file because the file has extension .sh so give the file name as ./ipLAN.sh

the output of the running script will be look like:

./ipLAN -bash: ./ipLAN: No such file or directory ./ipLAN.sh ping: sendto: No route to host ping: sendto: No route to host pi

Add a comment
Know the answer?
Add Answer to:
1. Install the supplied bash script on the Kali Linux VM BASH filename :ipLAN In text...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Hello I need help creating a bash script in linux for the following question: Create a...

    Hello I need help creating a bash script in linux for the following question: Create a script to expand the jpeg creator to create other types of files such as pdf, png, gif, etc. The jpeg creator is the following: #!/bin/bash FILE=$1 echo -e -n "\xFF\xD8\xFF\xE0"> $FILE dd if=/dev/random bs=512 count=4 >> $FILE

  • Hello I need help creating a bash script for linux as shown below getting the information...

    Hello I need help creating a bash script for linux as shown below getting the information from ifconfig The script must programmatically gather and output the informationEXACTLY AS SHOWN BELOW and (not echo this and echo that). ====================================== Interface: AAA MAC Address: BB:BB:BB:BB:BB:BB IP Address: CCC.CCC.CCC.CCC Subnet Mask: DDD.DDD.DDD.DDD Received Bytes: EEEEEE ====================================== Thanks,

  • LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command...

    LINUX 140U Create a file named script1.sh that contains a bash script that: Accepts NO command line arguments and does NOT use the read command. I will give you no credit if your bash script includes a read command. Also, you need to have at least one for..in loop in your code even if there may be other ways to do this problem. The script will go through a list of entries in the current directory (do not process subdirectories):...

  • Copy/Paste your script from 5b here. 4. Let's look at a more complicated script executable. a....

    Copy/Paste your script from 5b here. 4. Let's look at a more complicated script executable. a. Write the following as script6.sh and change its permissions to count for num in d do if num eq 100 then count (count+1) done echo The number 10 was found $count times What is the output? Run the script as ./script6.sh 10 20 30 10 40 20 50 10 60 <enter Summarize what the script does r using the read command. The following script...

  • I am having trouble on what exactly to write so I can make the script work,...

    I am having trouble on what exactly to write so I can make the script work, can someone show how to properly do it? Use the vi editor to enter the following script (name this file testscript): #!/bin/bash #script to demonstrate : reading arguments from a command line & # interactively from within script # selection (if… then… else…. fi) # iteration (for loop) # USE FILES ENTERED ON THE COMMAND LINE echo The script you are running is $0...

  • (In Linux) 1. Create a file to write to from your script and save it as...

    (In Linux) 1. Create a file to write to from your script and save it as “.txt”. 2. Write the following information to the file that you created in Step 1: Today's date Your full name Your student ID The name of your course What directory you are in File permissions of the file that you created that allow everyone to read, write, and execute The long list of files in your current directory, providing all items and their process...

  • Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following...

    Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...

  • Problem 1 Write a BASH script to create a user account from the Linux system on...

    Problem 1 Write a BASH script to create a user account from the Linux system on which your script is run. The script should process two positional parameters. First positional parameter is supposed to be a string with a user name (e.g., user_name) Second positional parameter is supposed to be a string with a user password (e.g., user_password) In your script: Check if two positional parameters were passed to your script when it was invoked If NOT, print an appropriate...

  • LUNIX (Please Label) Exit vi (:q) and from the command line, type viscript4.sh. For this script,...

    LUNIX (Please Label) Exit vi (:q) and from the command line, type viscript4.sh. For this script, we will iterate through all files in the current directory print out their name using the for loop. Example (do not type yet): foriin*;do …;done where the…does some operation on$I, which stands for the current file. To do this, enter the following in your script4.sh file:           #!/bin/bash           for i in *; do                echo $i           done Once the above works, change the for loop to...

  • Please write a BASH Script in LINUX that... 1. is actually executable 2. has a comment...

    Please write a BASH Script in LINUX that... 1. is actually executable 2. has a comment to tell us what you did, why and how. 3. allows a user to enter their name and a number between 1 than 100 (this must be prompted so the user knows what to do) 4. creates a random number between 1 and 100 for you to guess. The command to create a random number is shown below. (if you find a better one...use...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT