Simple example of a bash builtin command named “wait”

ABOUT wait wait waits for the process identified by process ID pid (or the job specified by job ID jobid), and reports its termination status. If an ID is not given, wait waits for all currently active child processes, and the return status is zero. If the ID is a job specification, wait waits for… Continue reading Simple example of a bash builtin command named “wait”

Fundamentals related to a bash builtin command named “test”

ABOUT test test provides no output, but returns 0 for "true" (test successful) and 1 for "false" (test failed). RELATED COMMAND LINE EXPOSURE [bash] $num=10; if (test $num -gt 5); then echo "yes"; else echo "no"; fi yes $num=1; if (test $num -gt 5); then echo "yes"; else echo "no"; fi no $num=5; if (test… Continue reading Fundamentals related to a bash builtin command named “test”

Fundamentals related to bash builtin command named “shift”

ABOUT shift shift [n] The positional parameters from n+1 ... are renamed to $1 .... Parameters represented by the numbers $# down to $#-n+1 are unset. n must be a non-negative number less than or equal to $#. If n is 0, no parameters are changed. If n is not given, it is assumed to… Continue reading Fundamentals related to bash builtin command named “shift”

About bash builtin command named “eval”

ABOUT eval eval is a builtin command of the Bash shell. It concatenates its arguments into a single string, joining the arguments with spaces, then executes that string as a bash command. It's similar to running bash -c "string", but eval executes the command in the current shell environment rather than creating a child shell… Continue reading About bash builtin command named “eval”

a look into the bash builtin command named “disown”

[bash light="true"] $jobs -l $ping gnu.org PING gnu.org (208.118.235.148) 56(84) bytes of data. 64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=1 ttl=53 time=267 ms 64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=2 ttl=53 time=266 ms 64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=3 ttl=53 time=267 ms 64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=4 ttl=53 time=321 ms 64 bytes from wildebeest.gnu.org (208.118.235.148): icmp_seq=5… Continue reading a look into the bash builtin command named “disown”

Hacking with Makefile for machine architecture detection

# SPDX-License-Identifier: GPL-2.0 INCLUDEDIR := -I. CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g TEST_GEN_FILES := adi-test UNAME := $(shell uname -m) all: $(TEST_GEN_FILES) $(TEST_GEN_FILES): adi-test.c ifeq ($(UNAME), sparc64) $(info Machine architecture does match) else $(info exit) $(error Machine architecture does not match) endif TEST_PROGS := drivers_test.sh include ../../lib.mk $(OUTPUT)/adi-test: adi-test.c