~ubuntu-branches/ubuntu/vivid/cctools/vivid

« back to all changes in this revision

Viewing changes to ftsh/test/variables.ftsh

  • Committer: Bazaar Package Importer
  • Author(s): Michael Hanke
  • Date: 2011-05-07 09:05:00 UTC
  • Revision ID: james.westby@ubuntu.com-20110507090500-lqpmdtwndor6e7os
Tags: upstream-3.3.2
ImportĀ upstreamĀ versionĀ 3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#
 
3
# Check that variables can be set, examined,
 
4
# and redirected as files.
 
5
#
 
6
 
 
7
function printit
 
8
        echo "name is ${1}"
 
9
        echo name is ${1}
 
10
        echo "name" "is" "$1"
 
11
        echo "name is $1"
 
12
        echo name is $1
 
13
        echo "name" "is" "$1"
 
14
end
 
15
 
 
16
name=value
 
17
printit ${name}
 
18
printit "${name}"
 
19
printit $name
 
20
printit "$name"
 
21
 
 
22
name="quoted value"
 
23
printit ${name}
 
24
printit "${name}"
 
25
printit $name
 
26
printit "$name"
 
27
 
 
28
echo hello dolly -> v
 
29
sort -< v -> sv
 
30
 
 
31
printit ${v}
 
32
printit "${v}"
 
33
printit $v
 
34
printit "$v"