Category: operating system

  • ar – create, modify, and extract from archives

    ABOUT ar The archiver, also known simply as ar, is a Unix utility that maintains groups of files as a single archive file. Today, ar is generally used only to create and update static library files that the link editor or linker uses and for generating .deb packages for the Debian family; it can be […]

  • 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 […]

  • 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 […]

  • Command to suspend a GNU Bash shell

    ABOUT suspend Suspend the execution of this shell until it receives a SIGCONT signal. [bash] $suspend ^C^C |^Z [/bash] [bash] $kill -18 5139 $ [/bash] [bash] $suspend ^C^C |^Z $ [/bash] LINK

  • 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 […]

  • How to use bash builtin command named “readonly” ?

    ABOUT readonly Marks name specified by Name parameter as read-only. TYPICAL COMMANDLINE SESSION [bash] $a=1 $a=2 $echo $a 2 $readonly a $a=1 bash: a: readonly variable $echo $a 2 $a=2 bash: a: readonly variable $ [/bash] LINK

  • 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 […]

  • a look into the bash builtin command named “disown”

    [bash light=”true”] $jobs -l $ping PING ( 56(84) bytes of data. 64 bytes from ( icmp_seq=1 ttl=53 time=267 ms 64 bytes from ( icmp_seq=2 ttl=53 time=266 ms 64 bytes from ( icmp_seq=3 ttl=53 time=267 ms 64 bytes from ( icmp_seq=4 ttl=53 time=321 ms 64 bytes from ( icmp_seq=5 […]

  • 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 := include ../../ $(OUTPUT)/adi-test: adi-test.c