TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Advanced Bash Scripting

120 pointsby mbowcockover 13 years ago

8 comments

Adaptiveover 13 years ago
This is hands down the best Bash resource online or in print. Don't let the "advanced" throw you off. It's the source of pretty much everything (of significance) that I know about bash.<p>For other applications it makes sense to use your scripting language of choice (libraries, etc.) but in any situation where you need absolute portability or availability on an otherwise bare system, bash is the way to go.<p>There are whole projects like the Arch Linux Installation Framework (AIF) written in bash for this reason.<p>Named arrays, quick string handling and the [[ ]] test syntax alone make this worth reading, and that's just scratching the surface.
评论 #3343861 未加载
评论 #3343171 未加载
评论 #3342679 未加载
elibenover 13 years ago
While bash is certainly more pleasant to write and use than the other shell languages, I made myself a rule I abide by, a long time ago. Never use shell to write anything non-trivial. Unless it's a one liner that just stitches some Unix commands together, just use a real language (Python, for example). I can't count how many times I found myself being grateful for this decision. Shell scripts just have a way of growing in size and complexity, and swallowing the shell pill is the quick road into abyss.
评论 #3343457 未加载
jhaglundover 13 years ago
I recently found this site useful. I wrote a script that glued together some commands to be run by cron. Then the requirements grew and the script's complexity grew, and grew, and before long I learned that bash scripts support functions.<p>At this point, I wished I had started in python.<p>To answer maven911, I usually do LAMP stack development but pick up all kinds of technologies along the way.
评论 #3342315 未加载
1010011010over 13 years ago
Here's the short version of the Advanced Bash Scripting Guide: "Use Python".<p>Long bash scripts are less readable and maintainable than python scripts.
评论 #3342496 未加载
评论 #3342178 未加载
评论 #3342758 未加载
评论 #3342721 未加载
评论 #3342554 未加载
评论 #3343496 未加载
kaichanvongover 13 years ago
I'd really like this as an Epub, Pdf or something I can just stick on my iPad. Anyone know of a link for this... or am I going to have to do this for everyone? :]
评论 #3343056 未加载
评论 #3343833 未加载
评论 #3347429 未加载
Maven911over 13 years ago
has anyone gone through the entire book/guide, and i wonder is it because of your job and what other technologies you have to know in-depth
评论 #3342735 未加载
评论 #3343597 未加载
przemocover 13 years ago
ABS can be handy for some quick look up, but if you want to learn Bash then go with Greg's Bash Guide:<p><a href="http://mywiki.wooledge.org/BashGuide" rel="nofollow">http://mywiki.wooledge.org/BashGuide</a><p>Check also the list of Bash online tutorials:<p><a href="http://wiki.bash-hackers.org/scripting/tutoriallist" rel="nofollow">http://wiki.bash-hackers.org/scripting/tutoriallist</a>
评论 #3343838 未加载
taf2over 13 years ago
hasn't this resource been around the block for 10+ years? I remember googling' "advanced bash scripting" function in college and finding a resource just like this one...