| Bash Prompt HOWTO: $Revision: 0.97 $, $Date: 2007/10/20 11:39:20 $ | ||
|---|---|---|
| Prev | Chapter 10. Prompt Code Snippets | Next |
ps ax | wc -l | tr -d " " OR ps ax | wc -l | awk '{print $1}' OR ps ax | wc -l | sed -e "s: ::g". In each case, tr or awk or sed is used to remove the undesirable whitespace.
Relative speed: any one of these variants takes about 0.9 seconds on an unloaded 486SX25.