PATH=/usr/local/cs/bin:$PATH

What you'll do/learn as a software developer...

Scripts Logic

> true || echo ouch
# nothing will happen
> true && echo ouch
> ouch

Simple Operations / Command

Bash scripting cheatsheet


# ps -> process status
> ps -ef >psout

# read the content in the directory and output to stdout or a file (by using > )
> cat /etc/passwd/etc/ps-release

# the - operand will tell cat to get from the std input
# < read from x
> cat /somepathname - /otherpath < /anotherPath

# output of echo "abc" is passed to cat which then is output to the stdout bc/c of -
> echo abc | cat /dev/null -
> abc
# /dev/null is a special directory for dev purpose
# when you read it, it's empty, and when you write to it, the output will vanish
# /dev/full is the opposite of it: whenever you write to it, it's always full

# change mode, change the permission of the file
> chmod 755 somefile
# first digit: specify permission of user
# second digit: permission for group user
# third digit: permission for others

Content Showing Commands