Skip to content

Commit

Permalink
Added 'catt' alias, which displays file content or folder content, ac…
Browse files Browse the repository at this point in the history
…cording to file type.
  • Loading branch information
dvergeylen committed Aug 5, 2015
1 parent a418c69 commit 0fb33e4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions aliases/available/general.aliases.bash
Expand Up @@ -55,3 +55,14 @@ fi
# Directory
alias md='mkdir -p'
alias rd='rmdir'

# Display whatever file is regular file or folder
catt() {
for i in "$@"; do
if [ -d "$i" ]; then
ls "$i"
else
cat "$i"
fi
done
}

0 comments on commit 0fb33e4

Please sign in to comment.