sorry for my English.
I write bash-file, that uses variable: shared_var=/system/xbin
My script-file:
exec="./adb shell chmod 644 $shared_var/$2"
echo $exec
$exec
Let’s run this script:
>bash gapp.sh misc su
./adb shell chmod 644 /system/xbin/su
: No such file or directory n/su
Let’s run string “./adb shell chmod 644 /system/xbin/su” without script:
> ./adb shell chmod 644 /system/xbin/su
(No output, OK)
I have few questions:
- Why are script and direct input in terminal have different results?
- Why instead of “No such file or directory /system/xbin/su” adb returns “No soch file or directoryn/su” (adb result looks distorted)
- What is solution of my problem?
does it work, if your shell script only has
ie, not assigning it to another variable, and no quoted strings
Also, if you are editing the file in Windows, make sure you save the file with
Unixlinefeeds.