View Single Post
Old 12-20-2012, 03:33 AM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
notes: I use bash rather than ash for this. (bash is available for the 3 and the 5)

if you get
/mnt/us/bin/filechecker: line 42: syntax error: Bad substitution
you need to check your bash is being correctly referenced.

ah c'mon everyone likes bashing other peoples rubbishy scripting Chip in!

it should be methodised at the very least. : ) No? : D



ISSUES FOR THE 3:
The sub-string substitution needs reworking for the really ancient busy box on the 3.
I am enclosing egrep full version to facilitate this rewrite.

The ancient busybox find does not support iname

Either: I have enclosed a binary build of find that should do that job.
invoke it directly to bypass busybox like
/mnt/us/wherever/find /location/to/search -iname '*'"$file"'*'

OR: change the ln -s link, or add an alias, or something to get it referencing find and bash.
worst case. overwrite them. not recommended.
Attached Files
File Type: gz egrep.tar.gz (73.2 KB, 470 views)
File Type: gz bash-kindle-3.tar.gz (399.6 KB, 473 views)
File Type: gz busybox.tar.gz (982.9 KB, 448 views)
File Type: gz fgrep.tar.gz (55.4 KB, 454 views)
File Type: gz find.tar.gz (331.0 KB, 459 views)

Last edited by twobob; 10-13-2013 at 03:28 PM.
twobob is offline   Reply With Quote