DSL Ideas and Suggestions :: "Add to filetool.lst" button



I just wanted to let everyone know that mikshaw's little emelfm button script works very well. It is at the top of my button list right under mydsl. This is a little gem to have around.

Chris

bookmark

Agreed, tnx mikshaw....

and I understood the word fubar to mean ..
( Fscked Up Beyond All Repair )

73
ke4nt

Accepted and will be in the next release. This should help make it easier to explain to new users what to add to their filetool.lst depending on their needs.
Malfunction! *zzztrrrrgtz!*

There's a potential problem with that command.
Suppose 'pwd' returns '/ramdisk/home/dsl'.  The line(s) added will begin with 'ramdisk/'.  This isn't a problem with a vanilla liveCD or Frugal, but suppose you switch to using a persitent home with no symlink to it in /ramdisk.  Those files you previously backed up will have nowhere to go.

To fix this i've changed the cut command to sed:
pwd|sed 's/^\/ramdisk//;s/^\///'

Cut removed only the leading slash, but this one will remove the slash, plus a leading '/ramdisk' if it exists.

Hey guys, how about something like this???

Code Sample
for i in %f; do a=~/filetool.lst && echo "Adding $i to backup list .." && echo %d/$i |sed 's/^\/\(ramdisk\/\)*//'| join -a 1 -a 2 - $a >/tmp/t && mv /tmp/t $a; done && echo "Done."|| echo "Error"


Even with the console messages and temp file, it ran a little faster (using time) for me than Mik's script on embedded.

`join` used like this is something like `cat - $a|sort|uniq`, except that (again) it seems to run slightly faster here (every bit of speed helps with embedded!).

:p

Next Page...
original here.