source: MondoRescue/branches/2.2.9/mindi-busybox/shell/hush_test/hush-vars/var_bash2.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: 505 bytes
Line 
1var=abc123dcba123
2
3echo ${var/d/x}
4echo ${var/c/x}
5echo ${var//c/x}
6echo ${var/[123]/x}
7echo ${var//[123]/x}
8echo ${var/c*/x}
9echo ${var/*c/x}
10
11# must match longest match: result is "abx23"
12echo ${var/c*1/x}
13
14# empty replacement - 2nd slash can be omitted
15echo ${var/[123]}
16echo ${var//[123]}
17
18### ash doesn't support
19### # match only at the beginning:
20### echo ${var/#a/x}
21### echo ${var/#b/x} # should not match
22### echo ${var//#b/x} # should not match
23### # match only at the end:
24### echo ${var/%3/x}
Note: See TracBrowser for help on using the repository browser.