###### Start Script #############
#!/bin/sh
if [ $# -lt 1 ]
then
echo "Usage: $0 <filed_number> <filename>"
exit;
fi
cut -d"|" -f$1 $2|sort -u
###### End Script ###############
How to run
copy the contents from start script to end script and place in a file named cfs
$ chmod a+x cfs
$ copy the cfs to bin
$ cfs 1,3 filename
523|523
e23|e23
r23|r23
t23|t23
y23|y23
No comments:
Post a Comment