source: MondoRescue/branches/2.2.9/mindi-busybox/shell/hush_test/hush-misc/redir4.tests@ 2725

Last change on this file since 2725 was 2725, checked in by Bruno Cornec, 13 years ago
  • Update mindi-busybox to 1.18.3 to avoid problems with the tar command which is now failing on recent versions with busybox 1.7.3
  • Property svn:executable set to *
File size: 1.1 KB
Line 
1rm *shell_test* 2>/dev/null
2
3>\shell_test
4echo *shell_test*
5rm *shell_test*
6
7>\\shell_test
8echo *shell_test*
9rm *shell_test*
10
11>"\shell_test"
12echo *shell_test*
13rm *shell_test*
14
15>"\\shell_test"
16echo *shell_test*
17rm *shell_test*
18
19
20cat <<\shell_test
21Here1
22shell_test
23echo Ok1
24
25cat <<\\shell_test
26Here2
27\shell_test
28echo Ok2
29
30cat <<"\shell_test"
31Here3
32\shell_test
33echo Ok3
34
35cat <<"\\shell_test"
36Here4
37\shell_test
38echo Ok4
39
40
41echo Now with variable refs
42i=1
43
44
45>\shell_test_$i
46echo *shell_test*
47rm *shell_test*
48
49>\\shell_test_$i
50echo *shell_test*
51rm *shell_test*
52
53>"\shell_test_$i"
54echo *shell_test*
55rm *shell_test*
56
57>"\\shell_test_$i"
58echo *shell_test*
59rm *shell_test*
60
61echo Done;exit
62# UNFIXED BUG. bash apparently will expand $i even in terminating delimiter.
63# http://www.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html
64# does not mandate this behavior.
65# This is not likely to be used much in real-world.
66
67cat <<\shell_test_$i
68Here1
69shell_test_$i
70echo Ok1
71
72cat <<\\shell_test_$i
73Here2
74\shell_test_$i
75echo Ok2
76
77cat <<"\shell_test_$i"
78Here3
79\shell_test_$i
80echo Ok3
81
82cat <<"\\shell_test_$i"
83Here4
84\shell_test_$i
85echo Ok4
Note: See TracBrowser for help on using the repository browser.