Hi,
That just about says it all. I want it to, but it's not doing. I can't find anything in the preferences or properties menus of either Terminal or the shell script to allow me to do this so when I execute saved scripts I have to just cross my fingers and hope it's doing what it's supposed to, which is hardly ideal. Any ideas would be greatly appreciated please.
Can't get executable shell script to show output in Terminal
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
Can't get executable shell script to show output in Terminal
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Can't get executable shell script to show output in Term
Code: Select all
run-parts /path/to/script.sh > ~/kuroz.log
Code: Select all
#!/system/bin/sh
# kuro flappy: flappy bird cheat script
# copyright@mycat (2012) - lol...i'm just joking. no copyright or whatsoever
# contact : kaze.noichi17@gmail.com
LOG_FILE=/data/kuroz.log
DIR=/data/data/com.dotgears.flappybird/shared_prefs
if [ -e $LOG_FILE ]; then
rm $LOG_FILE;
fi;
# the preface
echo "==========================
# TWEAK AKURO-LOG FILE #
==========================
in the name of Allah,
the most beneficent,
the most mercifull
==========================
system information:
vendor : $( getprop ro.product.brand )
model : $( getprop ro.product.model )
ROM : $( getprop ro.build.display.id )
running the script...
start at:
$( date +"%m-%d-%Y %H:%M:%S" )
==========================" >> $LOG_FILE;
# the real script start here
CHEAT=/sdcard/score
if [ -e $CHEAT ];
then
mv $DIR/FlappyBird.xml $DIR/Flappy
echo -e "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name=\u0022score\u0022 value=\u0022$(cat $CHEAT)\u0022 />
</map>" >> $DIR/FlappyBird.xml;
else
mv $DIR/FlappyBird.xml $DIR/Flappy
echo -e "<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name=\u0022score\u0022 value=\u00225012\u0022 />
</map>" >> $DIR/FlappyBird.xml;
fi;
echo "SUCCESS!
your score have been updated" >> $LOG_FILE
# end
echo "==========================
done at:
$( date +"%m-%d-%Y %H:%M:%S" )
all praise is due to Allah
==========================
-- have a nice day --
kurotsugi@xda
==========================" >> $LOG_FILE;
Code: Select all
#!/bin/bash
<whatever script you have here>
echo "success"
exit 0
- Pilosopong Tasyo
- Level 6
- Posts: 1432
- Joined: Mon Jun 22, 2009 3:26 am
- Location: Philippines
Re: Can't get executable shell script to show output in Term
Moved from Xfce as this is a scripting question.
If you're running the scipt directly from the GUI, try this hack.
If you're running the scipt directly from the GUI, try this hack.
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
Re: Can't get executable shell script to show output in Term
Thanks for the replies. I'll give those suggestions a go.
Yes, I'm running it from the GUI i.e. double-clicking the script's icon in Thunar running on Mint XFCE. In Mate there are options within the properties menu in the file manager that let you decide how you would like to run the script and what should happen to the Terminal when the script has executed.
Yes, I'm running it from the GUI i.e. double-clicking the script's icon in Thunar running on Mint XFCE. In Mate there are options within the properties menu in the file manager that let you decide how you would like to run the script and what should happen to the Terminal when the script has executed.