Recently i blogged about how to get a process list if you aren’t able to fork any processes . Also a process list is allways handy, i allways find cat a very usefull tool too. But as you might have noticed cat is not a shell builtin. So everytime cat is called a new process needs to be forked. In case you can’t fork processes it’s a problem, and even if you can fork them you may save resources by “creating” a shell builtin cat.
So lets do this,
open your .profile for usage with your user only or /etc/profile for global usage (You may also use your .bashrc or .zshrc instead).
Append the following lines to the file:
#pseudo bash builtin cat function
function cat { echo “$(< $1)" }
Siehe Kommentar :)
Comandline
cat as a shell builtin
- Posted on
- by admin
- - 2 minutes read
Archiv
Categories
- Allgemein(75)
- Android(1)
- Daily Picture(57)
- FSyncMS(10)
- In 25 Tagen Durch Deutschland - Zug Um Zug(16)
- Interrail 2009(17)
- Nachdenklich(37)
- Out of My Head(23)
- Out of My Life(57)
- Pastes(24)
- Reisen(31)
- Softwarefund(2)
- Synchronsiation(21)
- Technik(96)
- Twitter(4)
- Uncategorized(73)
- Visit England(14)
- Zitate(17)