Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.mobile.android > #35670

Re: Is Android enough like Linux to run an if-then-else mailx batch command?

From VanguardLH <V@nguard.LH>
Newsgroups comp.mobile.android
Subject Re: Is Android enough like Linux to run an if-then-else mailx batch command?
Date 2016-11-06 05:01 -0600
Organization Usenet Elder
Message-ID <e88gseF9jmiU1@mid.individual.net> (permalink)
References <nvm89u$1kn1$1@gioia.aioe.org> <e8811nF604uU1@mid.individual.net> <e884sqF68t2U1@mid.individual.net>

Show all headers | View raw


Bob Martin wrote:

> in 35860 20161106 063119 VanguardLH <V@nguard.LH> wrote:
     ^                   ^
     '-------------------'--- What was that?  It's not the MID header or 
                              newsgroup name.

>> Algeria Horan wrote:
>>
>>> Is Android enough like Linux to run an if-then-else mailx batch command?
>>>
>>> In a thread seeking a better SMS scheduling app for Android, someone
>>> mentioned that, on Linux, the coding would look something like this:
>>>
>>>   If (some condition), then
>>>   mailx -s "Subject Line" recipient@tomobile.com < sms_file.txt
>>>   endif
>>>
>>> The assumption is that Android "is" linux, so, the question is whether that
>>> batch file would work on your typical non-rooted Android cellphone?
>>>
>>> Is Android enough like Linux to run an if-then-else mailx batch command?
>>
>> https://en.wikipedia.org/wiki/Scripting_Layer_for_Android
>> https://opensource.googleblog.com/2009/06/introducing-android-scripting.html
> 
> SL4A is no longer maintained and doesn't work on Android 6 & 7.

From the wikipedia article:
"As of January 2016, other developers have forked the SL4A code to
enable it to run on Android Lollipop and Android Marshmallow after
development on the main code branch stopped, for example the kuri65536
branch of SL4A [6] and droid-python [7]".

The OP never mentioned his version of Android.  Still lots of v4 and v5
users out there.  Never even looked at this before but it seems an
interpretation layer to allow running OTHER scripting languages than the
basic one (shell script) in the OS.

Every Linux distro that I've seen came bundled with a shell scripting
language, like sh[ell], bash, csh, etc.  Android doesn't have its own
scripting language?  Or did Google strip it out?  Some articles, like
http://bamboopuppy.com/making-an-android-shell-script/ and
http://www.pctips4u.com/2016/03/writing-shell-scripts-in-android.html,
mention writing a shell script using bash and sh.

Since [most] Android apps are written in Java, why can't that be used?

Then there's DroidScript (http://droidscript.org/) which uses
Javascript.  Last released in April 2016.  Requires Android v3+.  

Back to comp.mobile.android | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is Android enough like Linux to run an if-then-else mailx batch command? Algeria Horan <algeriahoran@algeria.horan.net> - 2016-11-06 03:33 +0000
  Re: Is Android enough like Linux to run an if-then-else mailx batch command? Ralph Fox <-rf-nz-@-.invalid> - 2016-11-06 18:45 +1300
    Re: Is Android enough like Linux to run an if-then-else mailx batch command? Algeria Horan <algeriahoran@algeria.horan.net> - 2016-11-07 18:03 +0000
  Re: Is Android enough like Linux to run an if-then-else mailx batch command? Wildman <best_lay@yahoo.com> - 2016-11-06 01:03 -0500
    Re: Is Android enough like Linux to run an if-then-else mailx batch command? Algeria Horan <algeriahoran@algeria.horan.net> - 2016-11-07 18:03 +0000
      Re: Is Android enough like Linux to run an if-then-else mailx batch command? Jasen Betts <jasen@xnet.co.nz> - 2016-11-10 23:30 +0000
  Re: Is Android enough like Linux to run an if-then-else mailx batch command? VanguardLH <V@nguard.LH> - 2016-11-06 01:31 -0500
    Re: Is Android enough like Linux to run an if-then-else mailx batch command? Bob Martin <bob.martin@excite.com> - 2016-11-06 07:36 +0000
      Re: Is Android enough like Linux to run an if-then-else mailx batch command? VanguardLH <V@nguard.LH> - 2016-11-06 05:01 -0600
        Re: Is Android enough like Linux to run an if-then-else mailx batch command? Andy Burns <usenet@andyburns.uk> - 2016-11-06 11:24 +0000
          Re: Is Android enough like Linux to run an if-then-else mailx batch command? VanguardLH <V@nguard.LH> - 2016-11-06 12:04 -0600
            Re: Is Android enough like Linux to run an if-then-else mailx batch command? Andy Burns <usenet@andyburns.uk> - 2016-11-06 18:26 +0000
            Re: Is Android enough like Linux to run an if-then-else mailx batch command? Whiskers <catwheezel@operamail.com> - 2016-11-06 20:10 +0000
              Re: Is Android enough like Linux to run an if-then-else mailx batch command? Piet <www.godfatherof.nl/@opt-in.invalid> - 2016-11-06 22:14 +0100
                Re: Is Android enough like Linux to run an if-then-else mailx batch command? Whiskers <catwheezel@operamail.com> - 2016-11-07 18:44 +0000
              Re: Is Android enough like Linux to run an if-then-else mailx batch command? "Carlos E.R." <robin_listas@invalid.es> - 2016-11-06 22:13 +0100
                Re: Is Android enough like Linux to run an if-then-else mailx batch command? Whiskers <catwheezel@operamail.com> - 2016-11-07 18:14 +0000
            Re: Is Android enough like Linux to run an if-then-else mailx batch command? "Carlos E.R." <robin_listas@invalid.es> - 2016-11-06 22:11 +0100
              Re: Is Android enough like Linux to run an if-then-else mailx batch command? Andy Burns <usenet@andyburns.uk> - 2016-11-06 21:24 +0000
                Re: Is Android enough like Linux to run an if-then-else mailx batch command? "Carlos E.R." <robin_listas@invalid.es> - 2016-11-06 22:44 +0100
      Re: Is Android enough like Linux to run an if-then-else mailx batch command? Algeria Horan <algeriahoran@algeria.horan.net> - 2016-11-07 18:03 +0000
        Re: Is Android enough like Linux to run an if-then-else mailx batch command? Askfor <askfor@nowhere.net> - 2016-11-08 03:16 +0100
    Re: Is Android enough like Linux to run an if-then-else mailx batch command? Askfor <askfor@nowhere.net> - 2016-11-06 15:29 +0100

csiph-web