Comment

Comment by AdmiralAsshat

As opposed to improper bash? Get off your high horse.

There is very much a bad way of doing bash. When I first started doing bash scripts, most of them looked like this:

cat file | grep string

cat file | wc

cat file | while read line

Multiple problems there. Then there was my initial attempts at finding files in a directory:

for i in `ls *`

This is when I learned about globbing.

There is enough variance in how things can be done in Bash with varying degrees of effectiveness that Google even has a Shell Style Guide: https://google.github.io/styleguide/shell.xml

parent AdmiralAsshat 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton