Questions tagged [ash]

A shell(ash) written by Kenneth Almquist and released to the comp.sources.unix Usenet news group on May 30th 1989. It has features similar to the Bourne shell(sh). Its many derivatives include the system shell on; Debian (dash), FreeBSD (sh), NetBSD (sh) and the default shell in Busybox (ash).

189 questions
2
votes
1 answer

How do I use the raw_window_handle() method from winit rust crate?

I'm trying to create my first Vulkan application using Rust following adrien ben's vulkan-tutorial. As I progressed to commit 1.2.1 I noticed he is creating the winit-window for Windows. Because I'm developing the application on my Linux-system I…
wyxvi
  • 23
  • 4
2
votes
2 answers

How to change default shell of OpenWrt?

The default shell of OpenWrt is ash, but I would like to change it to fish. When I ran chsh -s /usr/bin/fish (the absolute path of fish), it returned -ash: chsh: not found. The I changed the first line of /etc/passwd…
KumaTea
  • 504
  • 5
  • 17
2
votes
2 answers

reset NR in awk

cat file.txt MNS GYPA*N MNS GYPA*M c.59T>C;c.71A>G;c.72G>T MNS GYPA*Mc c.71G>A;c.72T>G MNS GYPA*Vw c.140C>T MNS GYPA*Mg c.68C>A MNS GYPA*Vr c.197C>A MNS GYPB*Mta c.230C>T MNS GYPB*Ria c.226G>A MNS GYPB*Nya c.138T>A MNS GYPA*Hut …
Shahin
  • 1,196
  • 1
  • 8
  • 15
2
votes
2 answers

Reset variable using shell

I use the shell script to reset variable. #!/bin/sh reset_var() { while [ "$#" -gt "0" ] do echo "\$1 is $1" unset $1 done } i=50 j= 40 reset_var i j but this it does not work! the purpose is to reset i and j variable to 0 is there…
Anis_Stack
  • 3,306
  • 4
  • 30
  • 53
2
votes
2 answers

Dockerfile RUN shell-script not running during docker build

I try to build a custom image for the EMQ MQTT server. But the script update_config.sh is not executed by during docker copmose up. Dockerfile: FROM emqttd-docker-v2.3.5 # change configuration file ADD update_config.sh…
Martin
  • 818
  • 9
  • 20
2
votes
1 answer

What init files are sourced in ash for non-interactive, non-login shells?

I have a Docker container, which uses alpine:3.7 as base image, and as a result, uses /bin/ash as its shell. I put the container into background running mode. My intend is that I can continually use docker exec $CONTAINER_ID at it. Thus,…
Stephen Chu
  • 343
  • 2
  • 15
2
votes
1 answer

Read a null-terminated string from binary into variable using od in MINIX ash

Rather rookie question but I got stuck with it for a while: I have a problem to read and parse a string that is stored in hard drive at the address that I know ... I don't know the length of the string, only it's maximum length say n. It has been…
micsza
  • 789
  • 1
  • 9
  • 16
2
votes
1 answer

How does ash files are structured?

I have a small distro (not busybox) that uses ash, and I am not sure how the dot file structure is handled. .ashrc doesnt seem to be picked up nor I see a .bash_profile analog. Is there a default convention for shell startup file?
2
votes
1 answer

Send value through double qoute/single qoute?

So i have a ash script that send command to device via telnet The command look like this. echo 'dofile("lcdprint.lua").lcdprint("date")' | telnet 192.168.1.23 23 I want the output date like this Tue Jul 12 17:10:51 WIB 2016 But instead of above…
2
votes
1 answer

Busybox: emulate line editing for read shell's built-in

I need to develop a simple text interface for an embedded system with more or less only the Busybox installed on it. For my purposes the read shell built-in would have sufficed. But the Busybox ash (or any other shell, they use the same code for the…
Dummy00001
  • 16,630
  • 5
  • 41
  • 63
2
votes
2 answers

Assign job count number to variable (POSIX-Shell)

Opening 3 jobs in ash with i.e. sh & sh & sh & and counting this jobs with i.e. jobs -p | wc -l shows 3 which is OK. But trying to assign this job count to a variable with JOBNR=$(jobs -p | wc -l) and printing this variable with echo…
deetee
  • 75
  • 1
  • 7
2
votes
3 answers

How to remove white spaces (\t, \n, \r, space) form the beginning and the end of a string in shell?

I want to remove white spaces (\t, \n, \r, space) form the beginning and the end of a string if they exist How to do that? Is it possibe to that only with expressions like ${str#*}?
MOHAMED
  • 41,599
  • 58
  • 163
  • 268
2
votes
1 answer

Provision with Vagrant on a box that uses Busybox

When I try provisioning on my Freifunk gluon node like I do it on my other debian machines: Vagrant.configure("2") do |config| config.vm.provision "shell", path: "bootstrap-node.sh" end Then I get the error: The configured shell…
rubo77
  • 19,527
  • 31
  • 134
  • 226
2
votes
2 answers

Break from imbricated for loop

I want to know if there is a way to leave imbricated for loop: check_mac_address() { local mac="$1" for wunit in `get_wunit`; do for iuc in `get_iuc`; do for assoc_mac in `get_iuc $wunit $iuc`;do …
stack_A
  • 713
  • 4
  • 13
  • 21
2
votes
2 answers

how to put all command arguments in one variable

I want to execute a shell script that require 3 arguments. The argument number 2 contains a string with space I want to put all arguments in one variable like this: Linux:~# kk="\"111\" \"222 222\" \"333\"" Linux:~# echo $kk "111" "222 222"…
MOHAMED
  • 41,599
  • 58
  • 163
  • 268
1 2
3
12 13