Skip to content

Instantly share code, notes, and snippets.

@meiwin
Created April 3, 2012 13:48
Show Gist options
  • Save meiwin/2292147 to your computer and use it in GitHub Desktop.
Save meiwin/2292147 to your computer and use it in GitHub Desktop.
Mig33 SHELL
# Create a single line script that returns the number of httpd processes that are running on the current machine
ps -e | grep httpd | grep -cv grep
# From the current folder (/tmp), provide some bash commands that will rename all the *.txt files in mig33/inner/ to *.dat
for fn in ./mig33/inner_folder/*.txt; do mv "$fn" "${fn/.txt}.dat"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment