~ubuntu-branches/ubuntu/trusty/abs-guide/trusty-proposed

« back to all changes in this revision

Viewing changes to ex26a.sh

  • Committer: Package Import Robot
  • Author(s): Sandro Tosi
  • Date: 2012-06-03 10:57:27 UTC
  • mfrom: (1.2.6)
  • Revision ID: package-import@ubuntu.com-20120603105727-rm7frl4feikr2swm
Tags: 6.5-1
* New upstream release
* debian/watch
  - updated
* debian/abs-guide.lintian-overrides
  - updated for new upstream code
* debian/control
  - bump Standards-Version to 3.9.3 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
var1=unset
 
4
previous=$var1
 
5
 
 
6
while echo "previous-variable = $previous"
 
7
      echo
 
8
      previous=$var1
 
9
      [ "$var1" != end ] # Keeps track of what $var1 was previously.
 
10
      # Four conditions on "while", but only last one controls loop.
 
11
      # The *last* exit status is the one that counts.
 
12
do
 
13
echo "Input variable #1 (end to exit) "
 
14
  read var1
 
15
  echo "variable #1 = $var1"
 
16
done  
 
17
 
 
18
# Try to figure out how this all works.
 
19
# It's a wee bit tricky.
 
20
 
 
21
exit 0