Alias to read file for police "10" codes - 13/07/06 12:31 PM
I'm trying to write an alias to echo a line from a text file depending on what parameters I give it. The text file looks like this:
10-0 Use caution
10-1 Unable to copy location
10-2 Signal Good
10-3 Stop transmitting
For example, I'd like to type /ten 3 and have it echo "10-3 Stop transmitting". I've tried this but it isn't working.
Quote:
10-0 Use caution
10-1 Unable to copy location
10-2 Signal Good
10-3 Stop transmitting
For example, I'd like to type /ten 3 and have it echo "10-3 Stop transmitting". I've tried this but it isn't working.
Code:
/ten { echo -a $read(ten.txt,w, $matchtok($1-, 10, 1,32) $+ *) }