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