Skip to content

Instantly share code, notes, and snippets.

@ovntatar
Created December 16, 2013 15:45
Show Gist options
  • Save ovntatar/7989158 to your computer and use it in GitHub Desktop.
Save ovntatar/7989158 to your computer and use it in GitHub Desktop.
Shell progressbar ..
#!/bin/bash
searchfor="Hallo" # something to search for
tempfile="search.log" # temporary logfile
echo -n "Searching for $searchfor. "
grep -rl $searchfor / 2>/dev/null 1>>$tempfile &
while ps |grep $! &>/dev/null; do
echo -en "."
sleep 0.3
done
echo -e "Done"
echo "Result:"
cat $tempfile
rm $tempfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment