Questions tagged [ash]
The Almquist shell is a variant of the Bourne shell. Its most famous forks ares busybox ash and dash.
66 questions
0 votes
1 answer
56 views
Why is the service simultaneously "active with no instances" and "stopped"?
System info Hardware: GL iNET X3000 OS: OpenWrt 21.02-SNAPSHOT Shell: ash Now, I will let the output speak for itself: root@GL-X3000:~# service prometheus-node-exporter-lua restart root@GL-X3000:~# ...
1 vote
2 answers
75 views
Parent shell script blocked from exiting by background subshell
I have the following script flow: The parent script is launched from a non-interactive shell and sources a child script. child launches a background subshell with (...) & and contains no code ...
0 votes
1 answer
514 views
How can I correctly configure Docker Rootless to run as a service on Alpine Linux
I need to run Docker Rootless on an Alpine Linux 3.19.0 instance. I have followed the instructions of this blogpost in order to create a basic setup with an user named dev. I wish to configure it as ...
0 votes
1 answer
365 views
How to execute history command by number in Alpine Linux (busybox, ash)?
Is it possible to execute a history command by number with !###, similar to bash/zsh? Alpine's ash shell does not interpret this: $ history 1441 date 1442 history $ !1141 -sh: !1141: not found
-1 votes
2 answers
318 views
Where is the prompt configured in ash's login shell?
I can login on an alpine based docker container by either a non-login or non-login shell, i.e. ash vs ash -l. $ docker run -it --rm alpine /bin/ash / # Now when I use the login shell, I see a weird ...
0 votes
3 answers
585 views
How to make 'adb shell' to read /etc/profile or other configuration files?
I am working on an embedded Linux system (kernel-5.10.24), and it uses ash from busybox as /bin/sh. The system support login from serial console and adb shell from PC. Now I found the shell started ...
1 vote
0 answers
1k views
Merge set x (xtrace) and v (verbose)
How to merge set -x and set -v in ash? (or set -v with a prefix) In other words, echo back command upon running. The DEBUG signal does not exist in ash: DEBUG: invalid signal specification. set -x $ ...
2 votes
1 answer
908 views
Stop stdin while command is running
How to stop stdin while command is running in ash (not bash)? For example: sleep 10 type echo hello while sleep is still running observe hello is in stdout after sleep finishes Desired: sleep 10 ...
1 vote
3 answers
9k views
How to use sh script to send hex data to /dev/ttyUSB0?
I'm working with a paired down embedded Linux installation that does not support bash, only sh across a ssh terminal. I need to send hex data to a connected USB device /dev/ttyUSB0. I'm able to do ...
0 votes
1 answer
2k views
alias in ash - limitation, syntax issue?
I'm running OpenWRT in a NAS (WD-MBL) and putting together a set of aliases to make maintenance easier via the command line. These work as expected: alias shutdown='sync && wait && ...
0 votes
1 answer
361 views
ash - parse a config file line after line
My config file looks as follows: ver 3 file test1.conf ~/etc file test2.conf ~/etc/conf script tst.sh I'd like my script to iterate through all lines prefixed with "file", extract filename ...
16 votes
2 answers
33k views
What is the difference between `ash` and `sh` shell on Linux?
I am new to a lot of tools on Linux. A quick search did not help, I only got more about bash or sh, and searching for it somehow leans towards bash in the search results. There are quite a few ...
1 vote
2 answers
2k views
ssh, start a specific shell (ash), and source your environment on the remote machine
This is a kind of follow-up question to this question: ssh, start a specific shell, and run a command on the remote machine?, except more-specifically regarding ash, and focused on the fact that ...
0 votes
3 answers
122 views
find/detect file name goups
On fs i have files like: PREFIX_GROUPNAME_OTHERNAMES[.txt|.*] eg: A_ABC_A.txt A_ABC_B.txt A_ABC_C.txt A_XYZ_A.txt A_XYZ_B.txt A_XYZ_C.txt For some futher tasks i want to get the group names. $# ...
0 votes
1 answer
541 views
How to generate a string of concatenated key/value pairs in a script?
I need to build a string of --build-arg parameter using some key/value pairs (build.args file) in a busybox shell: script.sh #!/bin/sh one=$1 two=$2 shift while IFS= read -r line; do set "$@&...