Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Busyboxy / ash support #22

Open
slthomason opened this issue Jun 29, 2012 · 6 comments
Open

Busyboxy / ash support #22

slthomason opened this issue Jun 29, 2012 · 6 comments
Assignees

Comments

@slthomason
Copy link

Hi there,

I am very interested in using ticktick.sh. However, I am having a problem when running it on OpenWRT --> a distro that uses Busybox / ash (not bash).

I replaced the first line:

!/usr/bin/env bash

to be:

!/bin/sh

But when I try to run it, I get this:

./ticktick.sh

./ticktick.sh: line 332: syntax error: bad substitution

That is referring to this:

__tick_runtime_length() { echo $#; }
__tick_runtime_first() { echo ${!1}; }
__tick_runtime_last() { eval 'echo $'${!#}; }
__tick_runtime_pop() { eval unset ${!#}; }

Any ideas? Thanks!

@kristopolous
Copy link
Owner

They are different languages. I know they look the same and they are in the same family of bourne-derived shells, they are actually different though. Different globals, different settings available, different debugging hooks, different calling procedures ... all over the place.

I know bourne, tcsh, bash, and zsh probably better than most, and I know of ash, and have used busybox before.  Enough to realize that this probably isn't a simple swap.  Although it might be.

What's your use case?


From: slthomason [email protected]
To: Chris McKenzie [email protected]
Sent: Friday, June 29, 2012 3:03 AM
Subject: [TickTick] Busyboxy / ash support (#22)

Hi there,

I am very interested in using ticktick.sh.  However, I am having a problem when running it on OpenWRT --> a distro that uses Busybox / ash (not bash).

I replaced the first line:

#!/usr/bin/env bash

to be:

#!/bin/sh

But when I try to run it, I get this:

./ticktick.sh

./ticktick.sh: line 332: syntax error: bad substitution

That is referring to this:

__tick_runtime_length() { echo $#; }
__tick_runtime_first() { echo ${!1}; }
__tick_runtime_last() { eval 'echo $'${!#}; }
__tick_runtime_pop() { eval unset ${!#}; }

Any ideas?  Thanks!


Reply to this email directly or view it on GitHub:
#22

@kristopolous
Copy link
Owner

I've poured over busybox a few nights off and on now. Although I've got some leads on how to do equivalent functionality to TickTick, I can't really pull it off without maintaining a separate code-base, I'd like to close this and take no action. If I don't hear anything on it by say, November 1st (that's 5 weeks from now), I'll do so; that is unless I have multiple epiphanies and can figure out how to do this without incurring substantial risk (unlikely).

@slthomason
Copy link
Author

I have moved on to another project - but if this were to become possible, I
would always be interested. But no rush. But I know the embedded world
would be grafeful if you were able to figure it out.

Spencer

On Sat, Sep 29, 2012 at 6:06 PM, Chris McKenzie [email protected]:

I've poured over busybox a few nights off and on now. Although I've got
some leads on how to do equivalent functionality to TickTick, I can't
really pull it off without maintaining a separate code-base, I'd like to
close this and take no action. If I don't hear anything on it by say,
November 1st (that's 5 weeks from now), I'll do so; that is unless I have
multiple epiphanies and can figure out how to do this without incurring
substantial risk (unlikely).


Reply to this email directly or view it on GitHubhttps://github.com//issues/22#issuecomment-9009799.

@ghost ghost assigned kristopolous Dec 9, 2013
@CanadianJeff
Copy link

digging up an old issue I would love this so I could parse ulogd2 json output and display it inside an html table to show in LUCI

@Artoria2e5
Copy link

@CanadianJeff If you want a serious JSON parser, see jq. If you want a serious JSON parser but want it to run with busybox ash, go for JSON.sh. You don't use a big magical transpiler in production.

@stokito
Copy link

stokito commented Sep 15, 2020

OpenWrt has https://openwrt.org/docs/guide-developer/jshn but for BusyBox only systems we still need something instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants