all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Gary Wessle <phddas@yahoo.com>
Subject: Re: indent-tab-mode
Date: 02 Oct 2006 10:37:47 +1000	[thread overview]
Message-ID: <m31wprpn6s.fsf@localhost.localdomain> (raw)
In-Reply-To: slrnei091b.vns.keeling@heretic.spots.ab.ca

"s. keeling" <keeling@spots.ab.ca> writes:

> Gary Wessle <phddas@yahoo.com>:
> > 
> >  then how can I indent-while-typing this code
> >  #!/bin/sh
> >  #
> >  # if not vehicle name is given
> >  # i.e. -z $1 is defined and it is NULL
> >  #
> >  # if no command line arg
> > 
> >  if [ -z $1 ]
> >  then
> >  rental="*** Unknown vehicle ***"
> >  elif [ -n $1 ]
> >  then
> >  # otherwise make first arg as rental
> >  rental=$1
> >  fi
> > 
> >  case $rental in
> >  "car") echo "For $rental Rs.20 per k/m";;
> >  "van") echo "For $rental Rs.10 per k/m";;
> >  "jeep") ehco "For $rental Rs.5 per k/m";;
> 
> Typo:......^^^^

the expected results:




#!/bin/sh
#
# if not vehicle name is given
# i.e. -z $1 is defined and it is NULL
#
# if no command line arg

if [ -z $1 ]			# first arg not given?
    then
    rental="*** Unknown vehicle ***"
elif [ -n $1 ]			# first arg given
    then
# otherwise make first arg as rental
    rental=$1
fi

case $rental in
"car") echo "For $rental Rs.20 per k/m";;
"van") echo "For $rental Rs.10 per k/m";;
"jeep") echo "For $rental Rs.5 per k/m";;
"bicycle") echo "For $rental 20 paisa per k/m";;
    *) echo "Sorry, I can not get a $rental for you";;
esac

  reply	other threads:[~2006-10-02  0:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-30 21:03 indent-tab-mode Gary Wessle
2006-09-30 21:33 ` indent-tab-mode Tassilo Horn
2006-10-01 19:25   ` indent-tab-mode Gary Wessle
2006-10-01 19:55     ` indent-tab-mode Peter Dyballa
2006-10-01 20:25     ` indent-tab-mode s. keeling
2006-10-02  0:37       ` Gary Wessle [this message]
2006-10-11 11:57     ` indent-tab-mode Sam Peterson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m31wprpn6s.fsf@localhost.localdomain \
    --to=phddas@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.