Archive

Archive for August, 2009

Some bash stuff

August 18th, 2009 Wytze No comments

I just need a cheat sheet because I keep forgetting all these bash things.

Number of parameters: $#
All parameters: $@
String length: ${#foo}
Remove trailing slash: ${foo%/}
Check return value from last command: $?
Categories: Linux Tags: