Sponsored Content
Full Discussion: Printf behavior on AIX
Top Forums Shell Programming and Scripting Printf behavior on AIX Post 302973805 by SkySmart on Sunday 22nd of May 2016 01:21:34 AM
Old 05-22-2016
Printf behavior on AIX

command:

Code:
$ printf 'u1u1.%*s' 7

so if i run the above command on a linux box, i get the expected output of:

Code:
jserver@jserver-VirtualBox:~$ printf 'u1u1.%*s' 7
u1u1.       jserver@jserver-VirtualBox:~$ 
jserver@jserver-jserver:~$

it puts 7 spaces after the u1u1.

but when i run it on AIX or older systems, i get this:

Code:
$ printf 'u1u1.%*s' 7
printf: bad conversion
u1u1.s$

does anyone know of any command that will work across on UNIX platforms?
 

9 More Discussions You Might Find Interesting

1. Programming

ls behavior

I put this here because it is a 'behavior' type question.. I seem to remember doing ls .* and getting all the .-files, like .profile .login etc. But ls .* doesn't do that, it lsts the contents of every .*-type subdirectory. Is it supposed to? I should think that a -R should be given to... (10 Replies)
Discussion started by: AtleRamsli
10 Replies

2. Shell Programming and Scripting

Echo behavior

Echo is removing extra blank spaces. See the command. export INSTALLDIR=”First Second /Two Space” echo $INSTALLDIR out put: First Second /Two Space Here only on blnak space is present while with command Echo “$INSTALLDIR” Out put: ”First Second /Two Space” It's correct output... (2 Replies)
Discussion started by: Saurabh78
2 Replies

3. Solaris

Unexpected df behavior

Hi, I have Sun SPARC Enterprise T5140 with two 2,5" 15rpm 146GB SAS HDD. In friday there were a lot of errors with fs on them. After reconfiguring all seemed to be fine but today I get the following strange behavior of df -kh command and troubles with files, I written on first disk in friday.... (9 Replies)
Discussion started by: Sapfeer
9 Replies

4. AIX

Different behavior of LC_COLLATE in AIX & LINUX

1. I have created following files in both AIX & Linux touch a A b B c C x X y Y z Z 2. In AIX $ LC_COLLATE=en_US ; export LC_COLLATE $echo $ a b c x y z 3. In LINUX $ LC_COLLATE=en_US ; export LC_COLLATE $ echo $ a A b B c C x X y Y z Could anyone please explain the... (5 Replies)
Discussion started by: Anu_1
5 Replies

5. Programming

Strange behavior in C++

I have the following program: int main(int argc, char** argv){ unsigned long int mean=0; for(int i=1;i<10;i++){ mean+=poisson(12); cout<<mean<<endl; } cout<<"Sum of poisson: "<< mean; return 0; } when I run it, I get the... (4 Replies)
Discussion started by: santiagorf
4 Replies

6. AIX

LUN Behavior

Aix 6.1, working with a nim master and nim_altmaster both LPARS have access to the same data LUN, /nimdisk I do realize the risks of having 2 servers access the same LUN, however it serves the purpose of being able to restore mksysb's to/from our DR site if necessary, at least in theory ;) ... (3 Replies)
Discussion started by: mshilling
3 Replies

7. UNIX for Beginners Questions & Answers

awk Behavior

Linux Release Uname details Data file Ive been at the command line for some time. Back as far as SCO and Interactive Unix. I have always used this construct without issues. I want to isolate the ip / field 1. As you can see .. the first line is "skipped". This works as... (6 Replies)
Discussion started by: sumguy
6 Replies

8. AIX

[ASK] - AIX Fibre Channel behavior

Hello all, Let me introduce about the context and my environment. We have an AIX 6.1 system, it has 4 FC channels / > lsdev -Cc adapter | grep fcs fcs0 Available 23-T1 Virtual Fibre Channel Client Adapter fcs1 Available 23-T1 Virtual Fibre Channel Client Adapter fcs2 Available 23-T1... (14 Replies)
Discussion started by: Phat
14 Replies

9. Shell Programming and Scripting

Need find package that supports printf on AIX

My current find command does not support printf. I need find package that supports printf on AiX 6.1 system. Can anyone help me with the download link or where / how / if I can find it ? Can it be installed at a different non default location so that it can be reference without... (5 Replies)
Discussion started by: mohtashims
5 Replies
wnnds(1M)						  System Administration Commands						 wnnds(1M)

NAME
wnnds - Wnn6 dictionary lookup server SYNOPSIS
/usr/lib/locale/ja/wnn/wnnds [-s file] [-A file] [-N no] [-pno port_no] DESCRIPTION
wnnds provides multiple Wnn6 Kana-Kanji conversion server (jserver) with dictionary lookup-related processing for Wnn6 Kana-Kanji cover- sion. wnnds is normally started by the /etc/rc2.d/S94Wnn6 command on the system startup. OPTIONS
The following options are available. -s file Saves log in file. If "- " is specified for the file, the log file is directed to the standard error. -A file Reads file as access control file instead of the default access control file /etc/lib/locale/ja/wnn/wnnhosts. -N numberUses the value obtained by adding number to the well-known port number(26208) as TCP port number. -pno portUses port_no as TCP port number instead of the well-known port number. FILES
/etc/lib/locale/ja/wnn/wnnhosts Wnn6 access control file /usr/lib/locale/ja/wnn/ja/dic/iwanami/* Wmm6 system dictionary ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWjwnsu | +-----------------------------+-----------------------------+ SEE ALSO
jserver(1M), wnnaccess(1M), wnnhosts(4) SunOS 5.10 10 Jan 2003 wnnds(1M)
All times are GMT -4. The time now is 02:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy