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 …

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) …

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 …