12-20-2012, 03:33 AM
|
#2
|
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
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.
Last edited by twobob; 10-13-2013 at 03:28 PM.
|
|
|