4 ms·
Ah! I haven't thought of using wc, although I frequently use it to count the number of lines in my code. For awk, yes, I have to learn it. Thanks to you and the
by S4M 12y ago
Ah! I haven't thought of using wc, although I frequently use it to count the number of lines in my code. For awk, yes, I have to learn it. Thanks to you and the others who gave the example in bash.
- mitchty 12y agoTechnically this will work on any shell not just bash but good luck! Shell scripting is rather fun once you get the hang of it. Though if I'm honest, if I get a shell script about 30+ lines I tend to back up and break out ruby/perl/python/anything but shell. Think of it as a succinct glue language and you'll do fine. In the meantime feel free to use this python thing, its rather fun to be honest. Just wanted to demonstrate the unix-y way of doing it.