Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
midasuni
on Oct 27, 2022
|
parent
|
context
|
favorite
| on:
Shell script best practices, from a decade of scri...
If you need to follow these rules your script probably shouldn’t be written as a shell script.
IshKebab
on Oct 27, 2022
[–]
Ha yeah someone should make a single lint "Your script is over 100 lines. You should rewrite it in a sane language!"
iso1631
on Oct 27, 2022
|
parent
[–]
Start every script with the boilerplate
#!/bin/bash if [[ `wc -l $0|cut -f 1 -d ' '` -gt 100 ]] then echo "No, this is too long!" exit fi
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: