answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: How do you write a Shell script to find the greatest among the given set of numbers using command line arguments?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What does sys.argv do on python?

sys.argv is a way to access command line arguments in Python. sys.argv is an array of all the command line parameters, where the first value is the name of the file being run. For example, let's say you have a python script named example.py that looks like this: import sys print(sys.argv) This script will simply print the command line parameters in an array. If, for example, you run the script from a command line as python example.py param1 param2 the output will be ['example.py', 'param1', 'param2']


Is mdelet a valid script command?

mdelete is a command to delete files over FTP. Whether or not it's a valid script command would depend on the scripting language.


Can a Java program use one or more command line arguments?

Command line arguments in Java are, as with most programming languages, a way to give information to a program at the point of invoking (starting to run) that program. The information is given in the form of a text string. Command line arguments are accessible in a Java program as an array of String objects passed into the program's "main" method. Unlike some programming languages (such as C/C++), where the command used to invoke the program is passed into the first array location (index 0) and the arguments subsequently, in Java the first argument occupies index 0. Command line arguments are a useful way of gathering information from the user when it is likely will know the information at the start of the program. For example, a Java application might copy a file from myFile.txt to myNewFile.txt by running the command "java CopyUtil myFile.txt myNewFile.txt". It is useful to allow such information to be passed in via command line arguments to make the program more scriptable: in other words, more conducive to scripted invocation, through a Desktop shortcut, through a batch file, through a shell script, etc.


Which command is used to pause the execution of the script for a specified amount of time?

You need to be more specific. There are dozens (hundreds?) of scripting languages out there.


How do you send commands to a command-line EXE program from a batch?

Just put the commands in your batch file. When someone runs the program, it will execute the commands it comes across line-by-line. - Example Batch Script: This script will run an application EXE file with command line parameters. This will use the shutdown.exe file that comes with windows. It shuts down the computer in 60 seconds. @shutdown -s -t 60 - You could also use the START command. For any command or exe file that runs from the command line, you could open a command prompt and type the name of the file followed by /? to find out what you can use as command parameters. Example: START /?

Related questions

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.


What does sys.argv do on python?

sys.argv is a way to access command line arguments in Python. sys.argv is an array of all the command line parameters, where the first value is the name of the file being run. For example, let's say you have a python script named example.py that looks like this: import sys print(sys.argv) This script will simply print the command line parameters in an array. If, for example, you run the script from a command line as python example.py param1 param2 the output will be ['example.py', 'param1', 'param2']


How do you properly play a script in game maker?

script_name(arguments); If you have arguments, like what the V variable should be, put them in there. Script_name should be replaced with the name of your script.


Is mdelet a valid script command?

mdelete is a command to delete files over FTP. Whether or not it's a valid script command would depend on the scripting language.


What is script file?

Do you mean script file loaded in an HTML document, via the <SCRIPT src=filename> tag? If so, define one or more functions within that file, and pass parameters to the function[s]. Or do you mean client-side stand-alone scripts, executed by the script host? If so, pass arguments on the command line, after the script name, and access them within the script using the WScript.Arguments object.


Shell script that accepts a file name starting and ending line numbers as arguments and display all the lines between the given line numbers?

i=1 while [ $i -le $# ] do grep -v Unix $i > $i done


What are the ratings and certificates for The Greatest Script Ever Written - 2011?

The Greatest Script Ever Written - 2011 is rated/received certificates of: USA:PG-13


How do you insert admin command script on roblox?

get on on free models


How do you copy like telamon on roblox?

If you mean copy there look then you have to buy everything they are wearing and then put it all on. Or you can do it the in game way and get the players character appearance id (I think theres a script that gives you a command called try). to us the try command get the script that gives you it then say "try/character appearance id (the id will be a few numbers, no letters)".


When a script file contains more than one command what each command must end with?

In general each command in a script file is on a separate line, so it is terminated with a line terminator character (put it automatically when you press the Enter key). Unlike some programming languages, a script file does not need a special terminator for the end of the line.


Can a Java program use one or more command line arguments?

Command line arguments in Java are, as with most programming languages, a way to give information to a program at the point of invoking (starting to run) that program. The information is given in the form of a text string. Command line arguments are accessible in a Java program as an array of String objects passed into the program's "main" method. Unlike some programming languages (such as C/C++), where the command used to invoke the program is passed into the first array location (index 0) and the arguments subsequently, in Java the first argument occupies index 0. Command line arguments are a useful way of gathering information from the user when it is likely will know the information at the start of the program. For example, a Java application might copy a file from myFile.txt to myNewFile.txt by running the command "java CopyUtil myFile.txt myNewFile.txt". It is useful to allow such information to be passed in via command line arguments to make the program more scriptable: in other words, more conducive to scripted invocation, through a Desktop shortcut, through a batch file, through a shell script, etc.


What is the Purpose of exit command in Shell of Unix?

The 'exit' command allows you to stop a running shell script at any point and to return a "status" value back to whomever called the shell script. This is a very common practice with shell scripts; sometimes you want to stop the script before it gets to the end of the shell script (for various logic reasons). The 'exit' command also allows you to give a status that any other calling process can use to determine if the shell script ended successfully or not.