Revision as of 14:10, 26 April 2014 by Const (talk | contribs)
Jump to: navigation, search

Scripting is powerful technology especially valuable in embbedded Linux. It is used for building complex projects, building root file systems and distributions, system management, tests automation.

Most commons shells are bash on PC and busybox's ash on embedded Linux.

Shell scripting

Shell scripting libraries

  • shtool The GNU Portable Shell Tool
    • man shtool
    • Portable wrappers to standard operations
    • 3000 SLOC, 19 functions, bloated
  • Wicked Cool Shell Scripts, 2004, samples
    • Indeed cool shell scripts, worth to read
    • Most in interesting functions:,,,,,,,,
    • 4000 SLOC, 100 files-functions
    • Easy to use
  • mbfl - Marco's Bash Functions Library
    • 5000 SLOC, 500 functions, bloated
    • The philosophy of MBFL is to do the work as much as possible without external commands.
    • Complicated to use
  • @ aka monkey-tail
    • 300 SLOC, 20 functions, simple wrapper functions
    • Easy to use
    • Single script, 300 SLOC, 40 functions and aliases
    • Easy to use
    • Most useful functions: readline-bindings, duplicates, fs_usage, system_status_short, git_fixup, tcpdump-text, git_ign_add, for_each, mem_avail_kb

Specialized frameworks and libraries

Samples from books



See also