| William Park 2007-08-25, 7:19 pm |
| Previously, 'readtrack' was command to read track 1 and 2 data from
magnetic card swipe. It's been replaced with 'cardswipe' command which
read/write track data.
cardswipe -[12] array [-c] {-r < file | -w > file}
Read (-r) magnetic card swipe from stdin, and extract track1 and
track2 data. Eg.
track 1: %B...^...?
track 2: ;...=...?
Track segments are returned in shell array variable, specified
by -[12] options for track1 or track2, respectively. Track1 is
always consumed first. Track2 can occur after or before track1,
and is searched in that order. With -c option, returns error if
track is empty or not found.
Inverse of "read". Build card swipe string from track segments,
and write (-w) to stdout. Similiar to
echo -n "%B${track1[*]|,^}?;${track2[*]|,=}?"
With -c option, track will be printed only if it's non-empty.
Ref:
http://home.eol.ca/~parkw/index.html#creditcard
--
William Park <opengeometry@yahoo.ca>, Toronto, Canada
BashDiff: Super Bash shell
http://freshmeat.net/projects/bashdiff/
|