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
jserverrc(4)							   File Formats 						      jserverrc(4)

NAME
jserverrc - Initialization file for Wnn6 Kana-Kanji conversion server SYNOPSIS
/etc/lib/locale/ja/wnn/ja/jserverrc DESCRIPTION
jserverrc is the initialization file for Wnn6 Kana-Kanji conversion server ( jserver ), which is read when jserver starts. The followings can be set in the file. readfile dictionary_filedictionary_filename is a dictionary file name to be read when the server starts. The dictionary file resides on the server until the server process is terminated. This can save time for each client to read the dictionary file when it starts. Add a colon ( : ) just before the file name to allow jserver to read the file when wnnds is used. For example: readfile :iwanami/fisd max_client number number is the maximum number of clients that can connect to the server. The default is 64 . max_sticky_env number number is the maximum number of environments that can be set (fixed). The fixed environment maintains its config- uration even when connection to the client is terminated and the environment can be freed. This provides a time- saving startup because configuration tasks are omitted when the environment is used next time. The default is 10 . jserver_dir path path is the path name through which the server controls the dictionaries. User's frequency files and dictionaries are controled under the specified directory. The default is /usr/local/lib/dic/. @LIBDIR and @LANG notation can be used. @LIBDIR Is the default directory path name (/usr/lib/locale/ja/wnn) for the uum environment file. @LANG Should be ja for Japanese Solaris releases. def_param number_0...numSpecifies Kana-Kanji conversion parameters and pseudo-part of speech frequency. The default values are shown in parentheses. number_0 N for N (long) phrase analysis ( 5) number_1 Maximum number of short phrases in a long phrase ( 10) number_2 Main word frequency parameter ( 2) number_3 Short phrase length parameter ( 45) number_4 Main word length parameter ( 0) number_5 Bit parameter to indicate most recent usage ( 80) number_6 Dictionary parameter ( 5) number_7 Short phrase evaluation parameter ( 1) number_8 Long phrase length parameter ( 20) number_9 Number of short phrases parameter ( 0) number_10 Pseudo-part of speech "number" frequency ( 400) number_11 Pseudo-part of speech "Kana" frequency (-100) number_12 Pseudo-part of speech "alphanumerics" frequency ( 400) number_13 Pseudo-part of speech "symbol" frequency ( 80) number_14 Pseudo-part of speech "closing parentheses" frequency ( 200) number_15 Pseudo-part of speech "auxillary word" frequency ( 2) number_16 Pseudo-part of speech "opening parentheses" frequency ( 200) Specify integers for the above parameters. max_param number_0...numSpecifies the upper limits of the Kana-Kanji conversion parameters. The meaning and order of items are the same as def_param specifications. The default value will be set if the upper limit of autotuned parameters is smaller than the default value. If the upper limit is specified two times or more, the value set last will be used. min_param number_0...numSpecifies the lower limits of the Kana-Kanji conversion parameters. The meaning and order of items are the same as def_param specifications. The default value will be set if the lower limit of autotuned parameters is larger than the default value. If the lower limit is specified two times or more, the value set last will be used. set_giji_eisuu characterSpecifies character codes, which can be used, in addition to alphanumerics in pseudo-phrase conversion, as the "alphanumerics" pseudo-part of speech. character should be specified in any of the following notations: +-----------------------------+-----------------------------+ | Character | Notation | |CTRL_A |^A | |' '(SPACE) |0x20 x20 32 040 o40 | | |040 o40 : octal number | | |32 : decimal number | | |0x20 x20: hexadecimal num- | | |ber | |' -' |' -' | +-----------------------------+-----------------------------+ default_wnnds_list wnndsSpecifiesndthenfdefaults_wnnds to be used if no default wnnds options ( -ds and +ds ) are specified when jserver starts. wnnds is specified in the following format. hostname wnnds that uses the well-known port number(26208) on host hostname. hostname:no wnnds that uses the port number obtained by adding no to the well-known port number on host host- name. hostname/port_nownnds that uses port_no as the port number on host hostname. Up to three wnnds can be specified. Attempts are made for connection on the order specified. The one success- fully connected first is used as default wnnds . Example: default_wnnds_list wnnds1/26209 wnnds2 wnnds3:1 SEE ALSO
wnnenvutil(1), jserver(1M), wnnds(1M) SunOS 5.10 10 Jan 2003 jserverrc(4)
All times are GMT -4. The time now is 07:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy