rulesort
上传用户:lengbin
上传日期:2010-03-31
资源大小:121k
文件大小:1k
- #!/bin/bash
- #-----------------------------------------------------------------------
- # File : rulesort
- # Contents: sort output of apriori
- # Author : Christian Borgelt
- # History : ??.??.1996 file created
- # 27.02.1997 default settings moved to default case
- # 26.03.2003 adapted to current apriori version
- #-----------------------------------------------------------------------
- case $1 in
- '-1')
- cmd='s/(.*()([0-9]*.[0-9]*)(%[,/].*)/2#123/'
- sopt='-n -r'
- shift;;
- '-2')
- cmd='s/(.*(.*[,/] )([0-9]*.[0-9]*)(%.*)/2#123/'
- sopt='-n -r'
- shift;;
- default)
- cmd=''
- sopt='-d'
- ;;
- esac
- sed "$cmd" $1 | sort $sopt | sed 's/^.*#//' > $2