File: variables.ftsh

package info (click to toggle)
cctools 3.5.1-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 5,704 kB
  • sloc: ansic: 49,398; cpp: 15,568; perl: 12,324; sh: 2,668; python: 1,422; makefile: 632; yacc: 433; lex: 152; xml: 109
file content (34 lines) | stat: -rw-r--r-- 495 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34

#
# Check that variables can be set, examined,
# and redirected as files.
#

function printit
	echo "name is ${1}"
	echo name is ${1}
	echo "name" "is" "$1"
        echo "name is $1"
        echo name is $1
        echo "name" "is" "$1"
end

name=value
printit ${name}
printit "${name}"
printit $name
printit "$name"

name="quoted value"
printit ${name}
printit "${name}"
printit $name
printit "$name"

echo hello dolly -> v
sort -< v -> sv

printit ${v}
printit "${v}"
printit $v
printit "$v"