1echo $BASH_VERSION 2./histexp.tests: line 37: history: !!:z: history expansion failed 3 1 for i in one two three; do echo $i; done 4 2 /bin/sh -c 'echo this is $0' 5 3 ls 6 4 echo $BASH_VERSION 7 1 for i in one two three; do echo $i; done 8 2 /bin/sh -c 'echo this is $0' 9 3 ls 10 4 echo $BASH_VERSION 11 5 HISTFILE=$TMPDIR/newhistory 12 6 echo line 2 for history 13echo line 2 for history 14echo line 2 for history 15set -H 16echo line 2 for history 17line 2 for history 18 1 for i in one two three; do echo $i; done 19 2 /bin/sh -c 'echo this is $0' 20 3 ls 21 4 echo $BASH_VERSION 22 5 HISTFILE=$TMPDIR/newhistory 23 6 echo line 2 for history 24 7 set -H 25 8 echo line 2 for history 26a b c d e 27echo a b c d e 28a b c d e 29echo line 2 for history 30line 2 for history 31echo line 8 for history 32line 8 for history 33/bin/sh -c 'echo this is $0' 34this is /bin/sh 35echo sh 36sh 37echo /bin 38/bin 39echo e 40e 41a b c d e 42echo b c d e 43b c d e 44echo b c d 45b c d 46echo d e 47d e 48echo d e 49d e 50echo b c d 51b c d 52file.c 53echo file 54file 55echo .c 56.c 57echo 'file' 58file 59bax.c 60echo $file 61bax 62echo .c 63.c 64echo '$file' 65$file 66a b c d e 67echo 'a' 'b' 'c' 'd' 'e' 68a b c d e 69echo 'a b c d e' 70a b c d e 71foo.c foo.o foo.html foo.h 72echo bar.c foo.o foo.html foo.h 73bar.c foo.o foo.html foo.h 74echo bar.c bar.o bar.html bar.h 75bar.c bar.o bar.html bar.h 76echo xbar.c xbar.o xbar.html xbar.h 77xbar.c xbar.o xbar.html xbar.h 78echo xbar.c xbar.o xbar.html xbar.h 79xbar.c xbar.o xbar.html xbar.h 80echo xwhix.c xwhix.o xwhix.html xwhix.h 81xwhix.c xwhix.o xwhix.html xwhix.h 82echo xwhix.c xwhix.o xwhix.html xwhix.h 83echo 'xwhix' 84xwhix 85echo 'xwhix.h' 86xwhix.h 87echo 'xwhix.h' 88xwhix.h 89echo 'xwhix.h' 90xwhix.h 91 7 set -H 92 8 echo line 2 for history 93 9 echo a b c d e 94 10 echo line 2 for history 95 11 echo line 8 for history 96 12 /bin/sh -c 'echo this is $0' 97 13 echo sh 98 14 echo /bin 99 15 echo e 100 16 echo a b c d e 101 17 echo b c d e 102 18 echo b c d 103 19 echo d e 104 20 echo b c d 105 21 echo file.c 106 22 echo file 107 23 echo .c 108 24 echo 'file' 109 25 echo $file.c 110 26 echo $file 111 27 echo .c 112 28 echo '$file' 113 29 echo a b c d e 114 30 echo 'a' 'b' 'c' 'd' 'e' 115 31 echo 'a b c d e' 116 32 echo foo.c foo.o foo.html foo.h 117 33 echo bar.c foo.o foo.html foo.h 118 34 echo bar.c bar.o bar.html bar.h 119 35 echo xbar.c xbar.o xbar.html xbar.h 120 36 echo xwhix.c xwhix.o xwhix.html xwhix.h 121 37 echo 'xwhix' 122 38 echo 'xwhix.h' 123!! 124!! 125echo '!!' \!\! 126!! !! 127ok 1 128ok 2 129ok 3 130echo shopt a 131shopt a 132echo a b c d 2> /dev/null 133a b c d 134one two three four 135echo two ; echo four 136one two three four 137echo four ; echo two 138! 139! 140! 141! 142! 143! 144! 145! 146! 147\! 148\! 149\! 150\! 151a 152b 153c 154echo "#!/bin/bash" set -o posix 155#!/bin/bash set -o posix 156!! 157!! 158a 159echo $(echo echo a) 160echo a 161a 162echo echo a $(echo echo a) 163echo a echo a 164b 165!! $(echo !!) 166c 167echo "echo c" "$(echo echo c)" 168echo c echo c 169d 170echo "echo d" $(echo "echo d") 171echo d echo d 172e 173!! !! 174f 175!! 176f 177!! 178g 179echo "echo g" 180echo g 181g 182eval echo "echo g" 183echo g 184h 185echo \!\! `echo echo h` 186!! echo h 187i 188echo echo i `echo echo i` 189echo i echo i 190j 191echo `echo j` echo j 192j echo j 193a 194cat < <(echo echo a) 195echo a 196b 197echo echo b `echo echo b` 198echo b echo b 199c 200! 201d 202! 203e 204! ! 205./histexp4.sub: line 33: !': event not found 206/tmp/Step1 207echo /$(echo tmp)/Step1 208/tmp/Step1 209echo /<(echo tmp)/Step1 > /dev/null 210/tmp/Step1 211echo $(echo /tmp)/Step1 212/tmp/Step1 213echo <(echo /tmp)/Step1 > /dev/null 214/+(one|two|three)/Step1 215echo /+(one|two|three)/Step1 216/+(one|two|three)/Step1 217/*(tmp|dev|usr)/Step1 218echo /*(tmp|dev|usr)/Step1 219/*(tmp|dev|usr)/Step1 220+(/one|/two|/three)/Step1 221echo +(/one|/two|/three)/Step1 222+(/one|/two|/three)/Step1 223*(/tmp|/dev|/usr)/Step1 224echo *(/tmp|/dev|/usr)/Step1 225*(/tmp|/dev|/usr)/Step1 226one 227 echo echo one 228echo one 229echo one 230echo one 231 1 set -o histexpand 232 2 echo one 233 3 for f in a b c; do echo echo one; done 234 4 history 235two 236 echo echo two 237echo two 238echo two 239echo two 240 1 echo two 241 2 for f in a b c; do echo echo two; done 242 3 history 243a 244echo !! 245--between-- 246echo !! 247