05-18-2016
Quote:
Originally Posted by
wisecracker
As for the rest my code is designed to be as "bash" backwards compatible as is possible, and I am ignoring the 'printf' statements as errors.
Backwards compatible with what? It's already meant for bash, so I assume you mean sh... You store binary data in shell variables -- I wouldn't trust that to work in anything but brand-name BASH, and very modern BASH at that.
The problems it flags with printf are all legit, btw. What would happen if your binary data included a meaningless % character, just incidentally? printf would bomb, that's what, because % is not meaningless to printf. printf "%s" "$data" avoids that problem.
This User Gave Thanks to Corona688 For This Post:
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
One of my Solaris 8 machines hd was about to die. So I used g4u to create an image of the 9gb drive and I put it in a 36gb drive. That solved my dieing hd problem.
But....
How do I get my machine to see the unused 27gb of space?
Any help would be greatly appreciated. (1 Reply)
Discussion started by: Spyzic
1 Replies
2. AIX
Hi,
How do I query for unused partition in AIX 4.3 with DAS and SAA storage?
I know most unix administrator don't put all the capacity on the system at once.
thanks,
vene (1 Reply)
Discussion started by: venerayan
1 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
Can you please let me know how to delete any files that have not been accessed in the past 28 days in a directory.
Thanks,
Arun (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
4. AIX
How can i clean up my unused semaphore??? (4 Replies)
Discussion started by: abhishek27
4 Replies
5. HP-UX
Hello,
I have a system with HP-UX 11.23 installed on it. There are ~36GB of unused space on the HDD. I did a very basic installation, and it created the usual volume group /dev/vg00. When I look at the output of ioscan -funC disk, I see this (and more, but irrelevant to this post):
disk ... (1 Reply)
Discussion started by: goon12
1 Replies
6. Solaris
i Have alloted 20G in my vmware for solaris 10, upon installation, and some distribution of disk space to /,/opt,swap i just use 19G.
Can i still use the 1G? How? how to see the 1G? that i did not use? how can i use it?
appreciate your responce (17 Replies)
Discussion started by: kenshinhimura
17 Replies
7. AIX
Hi,
In our AIX 5.2 server , we have one unused ethernet adapter which doesn't have cable connection . For this interface , we are getting alerts in errpt .
Could you suggesthow to stop this alert ? And sametime i would like to keep this device in ODM .
Is there... (1 Reply)
Discussion started by: sekarsamy
1 Replies
8. Programming
Hello,
When creating shared memory in C, should be remove shared memory with shmctl function when don't need it. If it didn't remove, occupied shared memory stay and remain.
If we create shared memory repeatedly without removing unusable shared memory, /dev/shm will full.
Does Unix or... (1 Reply)
Discussion started by: pronetin
1 Replies
9. Solaris
Dear all,
I have a new Oracle Blade X4-2B server, running Solaris 10.
The server comes with a HBA card that will not be used now. It has not fibers connected to it. As a consequence, its leds never stop flashing.
My question is: how to disable this HBA card, without removing it physically... (2 Replies)
Discussion started by: Gus1971
2 Replies
PRINTF(1) User Commands PRINTF(1)
NAME
printf - format and print data
SYNOPSIS
printf FORMAT [ARGUMENT]...
printf OPTION
DESCRIPTION
Print ARGUMENT(s) according to FORMAT, or execute according to OPTION:
--help display this help and exit
--version
output version information and exit
FORMAT controls the output as in C printf. Interpreted sequences are:
" double quote
\ backslash
a alert (BEL)
backspace
c produce no further output
e escape
f form feed
new line
carriage return
horizontal tab
v vertical tab
NNN byte with octal value NNN (1 to 3 digits)
xHH byte with hexadecimal value HH (1 to 2 digits)
uHHHH Unicode (ISO/IEC 10646) character with hex value HHHH (4 digits)
UHHHHHHHH
Unicode character with hex value HHHHHHHH (8 digits)
%% a single %
%b ARGUMENT as a string with `' escapes interpreted, except that octal escapes are of the form or NNN
and all C format specifications ending with one of diouxXfeEgGcs, with ARGUMENTs converted to proper type first. Variable widths are han-
dled.
NOTE: your shell may have its own version of printf, which usually supersedes the version described here. Please refer to your shell's
documentation for details about the options it supports.
AUTHOR
Written by David MacKenzie.
REPORTING BUGS
Report printf bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
Report printf translation bugs to <http://translationproject.org/team/>
COPYRIGHT
Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
SEE ALSO
printf(3)
The full documentation for printf is maintained as a Texinfo manual. If the info and printf programs are properly installed at your site,
the command
info coreutils 'printf invocation'
should give you access to the complete manual.
GNU coreutils 8.5 February 2011 PRINTF(1)