Skip to content

Instantly share code, notes, and snippets.

View odadoda's full-sized avatar

Øyvind Dahl odadoda

View GitHub Profile
@odadoda
odadoda / helloworld.sh
Last active August 29, 2015 13:56
Simplest bash script
#!/bin/bash
echo “Hello world!”
@odadoda
odadoda / man-bash
Created February 28, 2014 11:39
Check manual pages for "bash"
man bash
@odadoda
odadoda / run-helloworld
Created February 28, 2014 11:42
Run script
./helloworld.sh
@odadoda
odadoda / chmod-ux
Created February 28, 2014 11:41
Set execute permissions
chmod u+x helloworld.sh
@odadoda
odadoda / echo-exit-status
Created February 28, 2014 11:39
Check last commands exit status
echo “do a command to check exit status”
echo $?
@odadoda
odadoda / ls-bin
Created February 28, 2014 11:24
list commands in /bin
ls /bin
@odadoda
odadoda / ls-bin
Created February 28, 2014 11:27
write out content for global variable "path"
echo $PATH
@odadoda
odadoda / content-of-path
Created February 28, 2014 11:28
Content of global variable "path"
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
@odadoda
odadoda / direcotires-with-commands
Created February 28, 2014 11:29
Directories to find commands
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin
@odadoda
odadoda / export-path
Created February 28, 2014 11:38
Concatinate new directory path to the global variable "PATH"
export PATH=“/newPath/here:$PATH”