Skip to content

Instantly share code, notes, and snippets.

Created Apr 7, 2017
What would you like to do?
Some common commands which males our life simpler
echo */ | wc --> Count the number of directories in a folder
for f in *\ *; do mv "$f" "${f// /_}"; done --> replace spaces in folder names, not recursive
for f in model/* ; do mv "$f" `echo "$f" | sed 's/_//g'` ; done --> Remove underscores from the file names
./ 2>&1 | tee test.txt --> To print the logs to the terminal as well as save them to a text file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment