answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What is the last line of bash shell script for loop?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you take a single line of input from the user in a shell script?

In "bash" shell it can be achieved with command "read" #!/bin/bash echo "Hi There, what is your name?" read name echo $name


How do you create a script file in Unix?

A shell script starts with the definition of the interpreter to use. Usually when one says ``shell script'', one means bash script. So a good first line would be #!/bin/bash This says that the program located in the filesystem at /bin/bash should be executed with this script as its input. With a bash script, you can simply start typing a list of commands. Furthermore it is possible to use logic and control structures like if, else, for, while, etc etc. See http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html for a good starting guide.


How do you indicate a comment line in a shell script?

With the # symbol.


Where can someone go to learn more about shell script?

Linux shell scripting tutorials are available as pdf files or videos where a lecturer speaks over a video of a computer console. This is where you can watch someone code in the bash environment and follow along.


What line is necessary at the beginning of a script to tell the OS what to use to run the script?

The special line at the beginning of the script is only necessary if you want the script to be run by a certain command interpreter that is different from your logon shell or because you don't know what environment the user of the shell might be running in. It is a special comment line that looks like: #!/command-name such as: #!/usr/bin/ksh which causes the ksh interpreter to be used for the rest of the shell script.


Write a shell script that counts a number of unique word contained in the alphabetical order line by line?

use python, shell is stupid


What character is used to delimit most configuration files in Linux?

According to the Linux+ Guide to Linux Certification 2nd ed., most configuration files on Linux systems are delimited using the colon symbol (:) while the awk command uses spaces or tabs as delimiters for each field in a line. SudoKing, please note that the hash symbol (#) allows the commenting of lines, not the delimiting of lines. This is not to be confused with a hashpling (such as #!/bin/bash) which is located on the first line in a shell script, and specifies the pathname to the shell that interprets the contents of the shell script.


What command starts the command line in Linux?

That would be a semi-contradiction; the command line would need to be already running in order to enter a command. The name of the program that actually provides the command line is called a shell. There are many different shells available for Linux, including Bash, ash, C Shell, fish, ksh, zsh, and scsh.The default command shell is /bin/sh (not /bin/bash, note).


What is a Unix 'default shell'?

The a default Unix shell is the shell that comes with and is activated initially with your distribution of Unix. The shell is essentially the program the runs the command line interface allowing someone to interact with their computer. Some examples are the Bourne-Again shell (bash) or the Bourne shell (sh).


How do you print a line on screen shell script?

That would depend on what shell you're using. Most seem to have a command similar to "echo x" which will print x to the terminal.


What is a shell interpreter?

A shell interpreter is a program that reads and executes commands entered by a user in a command-line interface. It interprets the commands and communicates with the operating system to carry out the requested tasks. Popular shell interpreters include Bash, sh, and PowerShell.


What is the purpose of using echo command?

The echo command echoes out any of the command line arguments given to it. It is commonly used in shell scripts to echo what portions of the shell script are doing.