| Getting an arbitary item from a list |
This script gets the specified element form the list on the command line...
#!/bin/bash # Select a specified item from a list. Copyright (c) Michael Still 2002 # Released under the terms of the GNU GPL # $1 is the number to get, $* except for $1 is the list of options, delimited # by a space each # We can the shift operation to get to the right number shift $1 echo $1
posted at: 04:00 | path: /bashrand | permanent link to this entry
There are no comments on this post which have survived moderation. 107 posts have been culled and 156 blocked. Be the first to make a non-spam comment here, please!
