mnee7 elli tzakkartna man ... it's really good to see ur name in the list again.
btw .. here is the script .. enjoy
[EMAIL PROTECTED] junk]$ cat data
a/e/d/f/
d/g/r/t/d/f/f/
[EMAIL PROTECTED] junk]$ ./abdallah data
a
a/e
a/e/d
a/e/d/f
d
d/g
d/g/r
d/g/r/t
d/g/r/t/d
d/g/r/t/d/f
d/g/r/t/d/f/f
[EMAIL PROTECTED] junk]$ cat abdallah
#!/bin/bash
DATAFILE=$1
for line in `cat $DATAFILE`
do
PARTS=`echo $line | tr '/' ' ' | wc -w`
for ((part=1; part <= PARTS ; part++))
do
echo $line | cut -d '/' -f -$part
done
done
On 4/23/05, Abdallah <[EMAIL PROTECTED]> wrote:
> Assalam Alaikum Wr Wb
>
> How are you all?
>
> I have been following the list on and off since I left and I am so glad of
> the traffic it has. I can tell that you guys are up to no good. :D
>
> Anyway, I have a question for you guys.
>
> I have a file as such:
>
> a/e/d/f/
> d/g/r/t/d/f/f/
> ..
> ..
>
> How can I sort it to look like this:
>
> a
> a/e
> a/e/d
> a/e/d/f
> d
> d/g
> d/g/r
> d/g/r/t
> d/g/r/t/d
> d/g/r/t/d/f
> d/g/r/t/d/f/f
> ....
> .....
>
> how can I use tools like awk, sed, cut or whatever else you can think of
> ..... to do it?
>
> notice:
> - that the letters could be words of various lengths.
>
> Abdallah
>
> --
> ___________________________________________________________
> Sign-up for Ads Free at Mail.com
> http://promo.mail.com/adsfreejump.htm
>
> _______________________________________________
> General mailing list
> [email protected]
> http://mail.jolug.org/mailman/listinfo/general_jolug.org
>
--
abulyomon
www.KiLLTHeUPLiNK.com
_______________________________________________
General mailing list
[email protected]
http://mail.jolug.org/mailman/listinfo/general_jolug.org