rigadicomando.org

Whatever you can cat

Random Quote

The only thing not changing is that all changes.

• About Yin and Yang

Secondary links

  • About
  • Contacts
  • Disclaimer

Home Blogs fabio's blog

"Leggi Argomenti" template per script

Submitted by fabio on Tue, 2006-01-31 13:55.
  • bash
  • scripts

Template per script che legge argomenti da riga di comando:

#!/bin/bash

# FUNCTIONS

function help () {
cat <<EOF
Command:         `basename $0`
Syntax:          `basename $0` [ -h ]
Description:     Descrizione script
Options:         -h help (questo help)
                 -a Opzione "A"
                 -b Opzione "B"
EOF
}

# VARIABILI

# OPZIONI

while getopts ha:b: var
do
  case $var in
      h) help; exit
          ;;
      a) echo "Opzione "-a" con argomento $OPTARG";
          ;;
      b) echo "Opzione "-b" con argomento $OPTARG";
  esac
done
shift ` expr $OPTIND - 1 `

  • fabio's blog
  • Login to post comments

tags in Arguments

administrivia bash Debian GNU/Linux OS emacs howto perl scripts web
more tags

Navigation

  • Feedback
  • News aggregator

ICT users' rights

  • Support freedom by joining the FSF during our year-end fundraiser
  • Bilski ruling: a victory on the path to ending software patents
  • FSF Releases New Version of GNU Free Documentation License
  • FSF reboots its High Priority list with a grant and call for input
  • "Avoiding Ruinous Compromises" by Richard Stallman
more

High Scalability Architecture

  • Scalability Perspectives #2: Van Jacobson – Content-Centric Networking
  • What CDN would you recommend?
  • Is Eucalyptus ready to be your private cloud?
  • Private/Public Cloud
  • Useful Cloud Computing Blogs
more

Debian Security

  • DSA-1667 python2.4
  • DSA-1666 libxml2
  • DSA-1665 libcdaudio
  • DSA-1664 ekg
  • DSA-1663 net-snmp
more

Drupal Security

  • SA-2008-069 - CCK for 5.x and 6.x - XSS vulnerabilities
  • SA-2008-068 - Localization client and Localization server - Cross site request forgery
  • SA-2008-067 - Drupal core - Multiple vulnerabilities
  • SA-2008-066 - Shindig-Integrator - Multiple vulnerabilities
  • SA-2008-065 - Node Clone - Access bypass
more

EFF

  • FBI Withdraws Unconstitutional National Security Letter After ACLU and EFF Challenge
  • EFF and Sheppard Mullin Defend Wikipedia in Defamation Case
  • Congress Must Investigate Electronic Searches at U.S. Borders
  • Betrayed MSN Music Customers Deserve More from Microsoft
  • EFF Report: FBI Slowed Terror Investigation with Improper NSL Request
more

Invent Geek

  • the ion cooler 2.0
  • the ultimate dance pad v1.0
  • thermaltake sponsors inventgeek
  • The Thermaltake MiniFridge Case Mod
  • Inventgeek gets a facelift and a butt tuck
more

 Privacy | Disclaimer | Drupal | Creative Commons

All content on this site is ditributed under Creative Commons License, each individual author is responsible for its own posts.

RoopleTheme