rc script priority limitation

J. Jones jjones at darkside.dynup.net
Tue Jul 31 14:01:02 PDT 2001


On Tue, Jul 31, 2001 at 02:24:40PM -0400, Gerard Beekmans wrote:
> i'd like to see proper sorting so if we have:
> S50
> S100
> S5000
> 
> they are executed in that order and not as S100, S50, S5000
>

I believe this is it.

:(03:57pm ~): cat foo.sh
#/bin/sh

for i in `ls bah/* | sed 's/^.*\/[S|K]\(.*[0-9]\)\(.*\)/\1-\2/' | sort`
do
        eval `echo $i | sed 's/^\(.*[0-9]\)-\(.*\)/stop=K\1\2;previous_start=S\1\2/'`
        echo $stop $previous_start
done
:(03:58pm ~): ls bah/
K4888888888444qux  K88888888423333234234baz  S002baz  S2foo  S4bar  S4foo S84848foo
:(03:58pm ~): ./foo.sh
K002baz S002baz
K2foo S2foo
K4bar S4bar
K4foo S4foo
K4888888888444qux S4888888888444qux
K84848foo S84848foo
K88888888423333234234baz S88888888423333234234baz
 
-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message



More information about the lfs-dev mailing list