mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-11-27 18:47:47 +01:00
small change to brace expansion to inhibit some error messages; changes to printf builtin for precision and field widths
This commit is contained in:
1 parent
1e1a0342a4
commit
b348b871b4
19 files changed
+376
-44
No files matched your search
@@ -1,3 +1,24 @@
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
# this should echo nothing
|
||||
printf '%ls'
|
||||
# this should echo a null byte
|
||||
printf '%lc' | hexdump -b
|
||||
|
||||
# this should echo a null byte per posix interp 1647
|
||||
printf '%lc' '' | hexdump -b
|
||||
|
||||
# test %ls and %lc with multibyte characters
|
||||
|
||||
V=ಇಳಿಕೆಗಳು
|
||||
@@ -19,3 +40,6 @@ printf "%C\n" "$V3" | hexdump -b
|
||||
|
||||
printf "%4.2lc\n" "$V3" | hexdump -b
|
||||
printf "%-4.2lc---\n" "$V3" | hexdump -b
|
||||
|
||||
# make sure %ls handles 0 precision the same as %s
|
||||
printf '[%.0s][%.0ls]\n' X X
|
||||
Reference in new issue
Block a user