Skip to main content

Questions tagged [ash]

The Almquist shell is a variant of the Bourne shell. Its most famous forks ares busybox ash and dash.

0 votes
1 answer
452 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 ...
Felipe Mastromauro Corrêa's user avatar
0 votes
1 answer
298 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
anthumchris's user avatar
-1 votes
2 answers
280 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 ...
k0pernikus's user avatar
  • 16.7k
0 votes
3 answers
563 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 ...
wangt13's user avatar
  • 651
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 $ ...
wjwrpoyob's user avatar
  • 460
2 votes
1 answer
878 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 ...
wjwrpoyob's user avatar
  • 460
1 vote
3 answers
8k 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 ...
Jim Fell's user avatar
  • 285
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 && ...
Groucho's user avatar
  • 31
0 votes
1 answer
350 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 ...
Kal800's user avatar
  • 35
16 votes
2 answers
32k 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 ...
questionto42's user avatar
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 ...
Gabriel Staples's user avatar
0 votes
3 answers
113 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. $# ...
f b's user avatar
  • 13
0 votes
1 answer
535 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 "$@&...
user3142695's user avatar
  • 1,649
0 votes
0 answers
17 views

ASH scripting quotes in backticks works with echo but not with actual execution [duplicate]

I am creating a script for my router (running busybox). In my script I generate a command in a variable like nvram set option='value with spaces' but when it is executed it complains that arguments ...
ulvesked's user avatar
  • 101
5 votes
3 answers
1k views

What one should check when re writing bash conditions for sh or ash?

Sometime, it is not possible to have the luxury of bash on a system, but conditions are easier to make on bash compared to sh or ash, what one should verify to ensure condition won't break with ...
Zulgrib's user avatar
  • 1,054

15 30 50 per page
1
2 3 4 5