BLOG

why does “exit status 0” mean success?

https://www.quora.com/in/Why-does-%E2%80%9Cexit-status-0%E2%80%9D-mean-success

Read More

tinkering with trap and exit commands

$echo $? 0 $echo $? 0 $exit 10 | tee solve.txt $cat solve.txt $rm solve.txt $exit 10 | echo $? 0 $exit -1 | echo $? 0 $exit -1 | echo $? 0 $false | true $echo $? 0 $false $echo $? 1 $true $echo $? 0 $exit 5 | tee var=$? $file var\=0 var=0: …

Read More

Indicate how each name would be interpreted if used as a command name

$type -a locate locate is /usr/bin/locate $type -a ls ls is aliased to `ls –color=auto’ ls is /bin/ls $type -t ls alias $type -t locate file $type -t /dev/urandom $type -t /dev/sda1 $type -t urandom $type -t sda1 $type -t type builtin $type -t shuf file $type -t bash file $type -t proc $type -t …

Read More

Non-deterministic Algorithms

https://cs.nyu.edu/courses/spring03/G22.2560-001/nondet.html

Read More

sort – sort lines of text files

$cat test.txt sept aug jan dec oct apr feb mar11 mar1 $sort test.txt apr aug dec feb jan mar1 mar11 oct sept $sort -M test.txt jan feb mar1 mar11 apr aug sept oct dec $

Read More

What is Tracker?

https://wiki.gnome.org/Projects/Tracker/WhatIsTracker

Read More

fold: Wrap input lines to fit in specified width

$cat test.pl use strict; use File::Rename (); use Pod::Usage; main() unless caller; sub main { my $options = File::Rename::Options::GetOptions or pod2usage; mod_version() if $options->{show_version}; pod2usage( -verbose => 2 ) if $options->{show_manual}; pod2usage( -exitval => 1 ) if $options->{show_help}; @ARGV = map {glob} @ARGV if $^O =~ m{Win}msx; File::Rename::rename(\@ARGV, $options); } sub mod_version { print __FILE__ …

Read More

command to install build-essential in debian ?

$sudo apt-get install build-essential Reading package lists… Done Building dependency tree Reading state information… Done build-essential is already the newest version (12.4). The following packages were automatically installed and are no longer required: alsa-base ant ant-optional app-install-data aptdaemon aptdaemon-data bluez-alsa bluez-gstreamer bogofilter bogofilter-bdb bogofilter-common cryptsetup-bin diffstat esound-common espeak-data evolution-webcal firebird2.5-common-doc fonts-lyx fonts-sil-gentium fonts-sil-gentium-basic freerdp-x11 gcalctool …

Read More