$sort -t: -k3 –debug /etc/passwd sort: using ‘en_US.UTF-8’ sorting rules root:x:0:0:root:/root:/bin/bash ________________________ _______________________________ jeffrin:x:1000:1000:Jeffrin Jose T,,,:/home/jeffrin:/bin/bash ___________________________________________________ _____________________________________________________________ uuidd:x:100:101::/run/uuidd:/bin/false ______________________________ ______________________________________ uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin ____________________________________________ ___________________________________________________ Debian-exim:x:101:103::/var/spool/exim4:/bin/false ____________________________________ __________________________________________________ statd:x:102:65534::/var/lib/nfs:/bin/false __________________________________ __________________________________________ sshd:x:103:65534::/var/run/sshd:/usr/sbin/nologin __________________________________________ _________________________________________________ messagebus:x:104:106::/var/run/dbus:/bin/false _________________________________ ______________________________________________ colord:x:105:109:colord colour management daemon,,,:/var/lib/colord:/bin/false _____________________________________________________________________ ______________________________________________________________________________ usbmux:x:106:46:usbmux daemon,,,:/home/usbmux:/bin/false _______________________________________________ ________________________________________________________ avahi:x:107:113:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false _____________________________________________________________ _____________________________________________________________________ pulse:x:108:114:PulseAudio daemon,,,:/var/run/pulse:/bin/false ______________________________________________________ ______________________________________________________________ …
Author Archives: jeffrin
encryption related algorithms that are built into a typical Linux Kernel
ABOUT Cryptography Cryptography or cryptology (from Ancient Greek: κρυπτός, translit. kryptós “hidden, secret”; and γράφειν graphein, “to write”, or -λογία -logia, “study”, respectively[1]) is the practice and study of techniques for secure communication in the presence of third parties called adversaries.[2] More generally, cryptography is about constructing and analyzing protocols that prevent third parties or …
Continue reading “encryption related algorithms that are built into a typical Linux Kernel”
a sample session with a “filter” named tr
$cat u.txt UPPERCASE $cat l.txt cat: l.txt: No such file or directory $tr A-Z a-z l.txt $cat u.txt UPPERCASE $cat l.txt uppercase $
sample session related to “command expansion” in Bash shell
$a=`time` real 0m0.000s user 0m0.000s sys 0m0.000s $a bash: a: command not found $a=`ls` $a bash: a: command not found $echo a a $echo $a a.txt b.txt trueangle $echo `a` bash: a: command not found $a=`ls` $b=time $echo $b time $b=`time` real 0m0.000s user 0m0.000s sys 0m0.000s $echo $b $b=`time` real 0m0.000s user 0m0.000s sys …
Continue reading “sample session related to “command expansion” in Bash shell”
using the dir() Built-in function in Python programming
>>> import struct >>> dir() # show the names in the module namespace [‘__builtins__’, ‘__doc__’, ‘__name__’, ‘struct’] >>> dir(struct) # show the names in the struct module [‘Struct’, ‘__builtins__’, ‘__doc__’, ‘__file__’, ‘__name__’, ‘__package__’, ‘_clearcache’, ‘calcsize’, ‘error’, ‘pack’, ‘pack_into’, ‘unpack’, ‘unpack_from’] >>> class Shape(object): def __dir__(self): return [‘area’, ‘perimeter’, ‘location’] >>> s = Shape() >>> dir(s) …
Continue reading “using the dir() Built-in function in Python programming”
sample session using “variable expansion” with Bash shell
$com=world $echo com com $echo $com world $x=hello $echo ${x}{com} hello{com} $echo ${x}${com} helloworld $echo $x$com helloworld $echo ${x}world helloworld $echo ${x} world hello world $echo $x world hello world $echo $xcom $echo $x com hello com $echo $x $com hello world $echo $x$com helloworld $echo $xcom $echo ${x}com hellocom $ $your_id=${USER}-on-${HOSTNAME} $echo “$your_id” jeffrin-on-debian …
Continue reading “sample session using “variable expansion” with Bash shell”
what is a nondeterministic algorithm ?
In computer science, a nondeterministic algorithm is an algorithm that, even for the same input, can exhibit different behaviors on different runs, as opposed to a deterministic algorithm. https://en.wikipedia.org/wiki/Nondeterministic_algorithm
sample session about “brace and tilde” expansions in Bash
$ls trueangle $echo hello > a.txt $echo killo > b.txt $cat {a,b}.txt hello killo $pwd /home/jeffrin/temp $cd ~ $pwd /home/jeffrin $cd tr trueangle/ trueangle.old/ $pwd /home/jeffrin $cd – /home/jeffrin/temp $pwd /home/jeffrin/temp $ls a.txt b.txt trueangle $
sample session about “alias expansion” in Bash
$ls -l 1 ls: cannot access ‘1’: No such file or directory $cat >> 1 hello $ls -l 1 -rw-r–r– 1 jeffrin jeffrin 6 Mar 20 23:38 1 $cat 1 hello $alias appendinput=”cat >>” $appendinput bash: syntax error near unexpected token `newline’ $appendinput app added $cat app added $
sample session with a bash shell expansion named “history expansion”
$! 1 bash: 1: command not found $!1 bash: !1: event not found $!+1 bash: !+1: event not found $!-1 ! 1 bash: 1: command not found $!! ! 1 bash: 1: command not found $!-0 bash: !-0: event not found $