]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/history.right
bash-5.1 distribution sources and documentation
[thirdparty/bash.git] / tests / history.right
CommitLineData
8868edaf 1./history.tests: line 17: history: -x: invalid option
3185942a 2history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
8868edaf
CR
3./history.tests: line 19: history: cannot use more than one of -anrw
4./history.tests: line 22: fc: -v: invalid option
3185942a 5fc: usage: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
d166f048
JA
6 1 for i in one two three; do echo $i; done
7 2 /bin/sh -c 'echo this is $0'
8 3 ls
9 4 echo $BASH_VERSION
101 for i in one two three; do echo $i; done
112 /bin/sh -c 'echo this is $0'
123 ls
134 echo $BASH_VERSION
14 for i in one two three; do echo $i; done
15 /bin/sh -c 'echo this is $0'
16 ls
17 echo $BASH_VERSION
184 echo $BASH_VERSION
193 ls
202 /bin/sh -c 'echo this is $0'
211 for i in one two three; do echo $i; done
22 echo $BASH_VERSION
23 ls
24 /bin/sh -c 'echo this is $0'
25 for i in one two three; do echo $i; done
26 1 for i in one two three; do echo $i; done
27 2 /bin/sh -c 'echo this is $0'
28 3 ls
29 4 echo $BASH_VERSION
30 5 echo line for history
31echo line for history
32 for i in one two three; do echo $i; done
33 /bin/sh -c 'echo this is $0'
34 ls
35 echo $BASH_VERSION
36 echo line for history
37displaying $HISTFILE after history -a
38echo line for history
d233b485 39HISTFILE=$TMPDIR/newhistory
d166f048
JA
40 1 for i in one two three; do echo $i; done
41 2 /bin/sh -c 'echo this is $0'
42 3 ls
43 4 echo $BASH_VERSION
44 5 echo line for history
d233b485 45 6 HISTFILE=$TMPDIR/newhistory
d166f048
JA
46 7 echo displaying \$HISTFILE after history -a
47 8 cat $HISTFILE
48for i in one two three; do echo $i; done
49/bin/sh -c 'echo this is $0'
50ls
51echo $BASH_VERSION
52echo line for history
d233b485 53HISTFILE=$TMPDIR/newhistory
d166f048
JA
54echo displaying \$HISTFILE after history -a
55cat $HISTFILE
56 1 for i in one two three; do echo $i; done
57 2 /bin/sh -c 'echo this is $0'
58 3 ls
59 4 echo $BASH_VERSION
60 5 echo line for history
d233b485 61 6 HISTFILE=$TMPDIR/newhistory
d166f048
JA
62 7 echo displaying \$HISTFILE after history -a
63 8 cat $HISTFILE
64 9 echo line 2 for history
65echo line 2 for history
66echo line 2 for history
67 1 for i in one two three; do echo $i; done
68 2 /bin/sh -c 'echo this is $0'
69 3 ls
70 4 echo $BASH_VERSION
71 5 echo line for history
d233b485 72 6 HISTFILE=$TMPDIR/newhistory
d166f048
JA
73 7 echo displaying \$HISTFILE after history -a
74 8 cat $HISTFILE
75 9 echo line 2 for history
76 10 # this should show up as one history entry
77 11 for x in one two three; do :; done
78set -H
79echo line 2 for history
80line 2 for history
814 echo $BASH_VERSION
825 echo line for history
d233b485 836 HISTFILE=$TMPDIR/newhistory
d166f048
JA
847 echo displaying \$HISTFILE after history -a
858 cat $HISTFILE
869 echo line 2 for history
8710 # this should show up as one history entry
8811 for x in one two three; do :; done
8912 # just a basic test. a full test suite for history expansion should be
9013 # created
9114 set -H
9215 echo line 2 for history
9316 unset HISTSIZE
9417 unset HISTFILE
954 echo $BASH_VERSION
965 echo line for history
d233b485 976 HISTFILE=$TMPDIR/newhistory
d166f048
JA
987 echo displaying \$HISTFILE after history -a
998 cat $HISTFILE
8868edaf 100./history.tests: line 90: fc: no command found
d166f048
JA
101 15 echo line 2 for history
102 16 unset HISTSIZE
103 17 unset HISTFILE
8868edaf 104 18 # now an out-of-range error because of the one=two not found in history
d166f048
JA
105aa ab ac
106echo xx xb xc
107xx xb xc
cce855bc
JA
108echo 44 48 4c
10944 48 4c
8868edaf 110./history.tests: line 105: fc: no command found
3185942a
JA
111aa
112bb
113cc
114echo cc
115echo cc
116cc
117aa
118bb
119cc
120echo cc
121echo cc
122cc
d166f048 1231
3185942a
JA
124one
125two
126three
127 1 cat <<!
128one
129two
130three
131!
132
133 2 history
134cat <<!
135one
136two
137three
138!
139
140one
141two
142three
8868edaf 1435.1
0001803f 144echo ${BASH_VERSION%\.*}
8868edaf 1455.1
0001803f 146 echo ${BASH_VERSION%\.*}
d233b485
CR
147a
148b
149c
150d
151e
152 1 echo a
153 2 echo b
154 3 echo c
155 4 echo d
156 5 echo e
157
158 1 echo a
159 2 echo e
160f
161g
162h
163i
164 1 echo a
165 2 echo e
166 3 echo f
167 4 echo g
168 5 echo h
169
8868edaf
CR
170./history3.sub: line 40: history: 16: history position out of range
171./history3.sub: line 41: history: 200: history position out of range
172./history3.sub: line 42: history: -20: history position out of range
173./history3.sub: line 43: history: -50: history position out of range
174./history3.sub: line 44: history: 5-0xaf: history position out of range
d233b485
CR
175 1 echo a
176 2 echo e
177 3 echo f
178 4 echo g
179 5 echo h
180
8868edaf
CR
181
1820
1831
1842
185(left
186mid
187right)
188A
189B
190
191(left
192mid
193right)
194A
195B
196
197(left
198mid
199right)
200A
201B
202
2030
2041
2052
206(left
207mid
208right)
209A
210B
211(left
212mid
213right)
214A
215B
216
2170
2181
2192
220(left
221mid
222right)
223A
224B
225(left
226mid
227right)
228A
229B
230a
231b
232./history5.sub: line 24: fc: history specification out of range
233./history5.sub: line 25: fc: no command found
2341 echo a
2352 echo b
2363 fc -0 # error
2374 fc -s -0 # error
238c
2396 echo c
2408 fc -l -0
241d
242echo d
243d
244a
245b
246c
247d
248e
249f
2504 echo d
2515 echo e
2526 echo f
253out of range 1
2546 echo f
2557 fc -l
2568 echo out of range 1
257out of range 2
2588 echo out of range 1
2599 fc -l 502 498
26010 echo out of range 2
261out of range 3
26210 echo out of range 2
26311 fc -l 498 502
26412 echo out of range 3
265out of range 4
26613 fc -l 1 99