While running a command, the user can pass a variable number of parameters in the command line. Within the command script, the passed parameters are accessible using ‘positional parameters’. These range from $0 to $9, where $0 refers to the name of the command itself, and $1 to $9 are the first through to the ninth parameter, depending on how many parameters were actually passed. Example: $ sh hello how to do you do Here $0 would be assigned sh $1 would be assigned hello $2 would be assigned how And so on … We will now look at some additional commands to process these parameters. #1) set Each process is also associated with a priority. This is used to ensure that the OS is able to fairly allocate time to various processing tasks. The ‘nice’ command can be used to reduced the priority of a process and thus be ‘nice’ to the other processes, i.e. $ nice <command> This line will run the specified command at a lower priority – by default, the priority wi...
Comments
Post a Comment