~ubuntu-branches/ubuntu/trusty/devscripts/trusty-updates

« back to all changes in this revision

Viewing changes to test/bashisms/heredocs.sh

  • Committer: Package Import Robot
  • Author(s): Benjamin Drung
  • Date: 2013-02-18 22:27:33 UTC
  • mfrom: (10.9.22 experimental)
  • Revision ID: package-import@ubuntu.com-20130218222733-7krtkqzko32xte0z
Tags: 2.13.0ubuntu1
* Merge from Debian experimental. Remaining changes:
  - Convert python scripts to python3. (Closes: #680313)
    Debian bug #695259 needs to be fixed to get the change into Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
cat <<- FOO
 
4
    foo
 
5
        bar
 
6
    moo
 
7
FOO
 
8
 
 
9
echo -e moo # BASHISM
 
10
 
 
11
foo() {
 
12
        cat <<- FOO
 
13
        foo
 
14
        bar
 
15
        moo
 
16
        FOO
 
17
        echo -e BASHISM
 
18
}
 
19
 
 
20
bar() {
 
21
        cat <<- FOO
 
22
        foo
 
23
        bar
 
24
        moo
 
25
    FOO
 
26
    echo -e nothing wrong here
 
27
FOO
 
28
        echo -e BASHISM
 
29
}
 
30
 
 
31
 
 
32
moo() {
 
33
        cat << FOO
 
34
        foo
 
35
        bar
 
36
        moo
 
37
    FOO
 
38
    echo -e nothing wrong here
 
39
        FOO
 
40
        echo -e still nothing wrong here
 
41
FOO
 
42
        echo -e BASHISM
 
43
}
 
44
 
 
45
baz() {
 
46
    cat << EOF1
 
47
EOF1 
 
48
    echo -e still inside the here doc
 
49
EOF1 ; echo -e still inside...
 
50
EOF1
 
51
    echo -e BASHISM
 
52
}