Sponsored Content
Full Discussion: printf Hexadecimal output
Top Forums Shell Programming and Scripting printf Hexadecimal output Post 302479389 by jim mcnamara on Friday 10th of December 2010 01:25:44 PM
Old 12-10-2010
@Scrutinizer

Where is the \'[value] syntax documented for POSIX shells? I do not think I've seen it. Or more likely I ignored it....

For example:
Code:
echo $(( \'A  + 1 ))

fails in ksh88 on Solaris 10.

This does not:
Code:
> printf "%d\n" \'A
65

 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Help please...output problems with printf.

#include <stdio.h> #include <math.h> // this function calculates the volume of a Cylinder int main(void) { int r; // radius int h; // height double M_PI; // pi int pOne = pow (r, 2); // get user input of radius and height printf ("Enter your... (3 Replies)
Discussion started by: pwanda
3 Replies

2. Shell Programming and Scripting

How to format the output using float in awk{printf}

Hi I'm using awk to manipulate the data in the 6th field of the file xxx_yyy.hrv. The sample data that is available in this field is given below 220731.7100000000000000 When i tried using this command cat xxx_yyy.hrv | awk '{printf("%23.16f\n",$6*-1)}' I get the output as... (4 Replies)
Discussion started by: angelarosh
4 Replies

3. Programming

capture the output of printf into another variable

Hi , I wonder if in java I can pipe the below output of the printf into a variable: System.out.printf(" This is a test %s\n", myVariable); I want to keep the output of the printf command to create my history array. Thanks. (2 Replies)
Discussion started by: arizah
2 Replies

4. Shell Programming and Scripting

NAWK conversion of hexadecimal input to decimal output via printf, I am close I can feel it

I have searched and the answers I have found thus far have led me to this point, so I feel I am just about there. I am trying to convert a column of hexadecimal to decimal values so that I can filter out via grep just the data I want. I was able to pull my original 3 character hex value and... (10 Replies)
Discussion started by: PCGameGuy
10 Replies

5. Shell Programming and Scripting

Problems with awk printf, formatted output

Hi, i have a script, which is incomplete, am on my way developing it. Input 1,12,2012,IF_TB001 2,12,2012,3K3 3,Z56,00000,25,229,K900,00, ,3G3, ,USD, ,0000000000,000, , , , 550000000 3,Z56,00000,53,411,W225,00,000, , ,USD,OM170,0000000000,000, , , , -550000000 4,Z56,COUNT, 4,SUM LOC,... (19 Replies)
Discussion started by: selvankj
19 Replies

6. Shell Programming and Scripting

Excel table like output with printf

Hi All; I try to create a excel like table with headers and some fields containing values, other long and complex mathematic formulas. I have some header like : Name Formula Value True/False Under name column, they are some formula names, formula column some long mathematic formulas... (9 Replies)
Discussion started by: reseki
9 Replies

7. Shell Programming and Scripting

Managing output... echo or printf?

Hello script guru's as i write more and more code i always block at managing output... either writing to standard out, writing to files via std out (log, temp file, etc). Don't get me wrong 99% of the time it DOES the job but maybe there is more efficient. I'm writing a small script to... (2 Replies)
Discussion started by: maverick72
2 Replies

8. UNIX for Beginners Questions & Answers

How to use printf to output a shell variable path?

So I created two shell variables: COLUMN1_HEADING, COLUMN2_HEADING. They have values: COLUMN1_HEADING="John" COLUMN2_HEADING="123456789" How would I use printf to get it to print an output like this: $COLUMN1_HEADING\t$COLUMN2_HEADING\nJohn\t123456789\n Thanks! (3 Replies)
Discussion started by: steezuschrist96
3 Replies
Heimdal Kerberos 5 error reporting functions(3) 	      HeimdalKerberos5library		   Heimdal Kerberos 5 error reporting functions(3)

NAME
Heimdal Kerberos 5 error reporting functions - Functions KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_eai_to_heim_errno (int eai_errno, int system_error) KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_errno_to_heim_errno (int eai_errno) KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_clear_error_message (krb5_context context) KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_error_message (krb5_context context, krb5_error_code ret, const char *fmt,...) __attribute__((format(printf KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarn (krb5_context context, krb5_error_code code, const char *fmt, va_list ap) __attribute__((format(printf Detailed Description Function Documentation KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_clear_error_message (krb5_context context) Clears the error message from the Kerberos 5 context. Parameters: context The Kerberos 5 context to clear KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_eai_to_heim_errno (int eai_errno, int system_error) Convert the getaddrinfo() error code to a Kerberos et error code. Parameters: eai_errno contains the error code from getaddrinfo(). system_error should have the value of errno after the failed getaddrinfo(). Returns: Kerberos error code representing the EAI errors. KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_h_errno_to_heim_errno (int eai_errno) Convert the gethostname() error code (h_error) to a Kerberos et error code. Parameters: eai_errno contains the error code from gethostname(). Returns: Kerberos error code representing the gethostname errors. KRB5_LIB_FUNCTION void KRB5_LIB_CALL krb5_set_error_message (krb5_context context, krb5_error_code ret, const char * fmt, ...) Set the context full error string for a specific error code. The error that is stored should be internationalized. The if context is NULL, no error string is stored. Parameters: context Kerberos 5 context ret The error code fmt Error string for the error code ... printf(3) style parameters. KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL krb5_vwarn (krb5_context context, krb5_error_code code, const char * fmt, va_list ap) Log a warning to the log, default stderr, include the error from the last failure. Parameters: context A Kerberos 5 context. code error code of the last error fmt message to print ap arguments Version 1.5.2 11 Jan 2012 Heimdal Kerberos 5 error reporting functions(3)
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy