Bash Snippets

Bash Snippets (One Liners)

Find all files (recursively from the current dir) with fiile extension .c and print the file content to stdout:

$ for i in `find . -type f -name "*.c"`; do cat "$i"; done

Does it work for files which contains blanks?
Guess what?
Solution: http://wooledge.org:8000/BashPitfalls

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License