02-25-2008
echo "4" | awk '{printf("%03d\n",$0)}'
this may help you
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
On a newly configured hp unix server, I got the following error while I was trying to untar a file:
tar -xvf 9201rdbms.tar
....
/htc_ora_prod/stage9.2.0_64bit/Disk2/stage/Components/oracle.rdbms.seeddb.compoltp/9.2.0.1.0/1/DataFiles/Expanded/seed/templates/Transaction_Processing.dfj, 174282115... (2 Replies)
Discussion started by: YuChing
2 Replies
2. Shell Programming and Scripting
How to insert leading zeros into a left-justisfied zip code?
e.g. Zip code is written as 60320 which is left-justified to make it be read as 0060320.
We have to move it to right-justifiable then insert 2 leading zeros into it... ;) (1 Reply)
Discussion started by: wtofu
1 Replies
3. UNIX for Dummies Questions & Answers
Hi can I know command to pad Zeros to a value
I get 16 and I need to send 0000000016 (5 Replies)
Discussion started by: mgirinath
5 Replies
4. UNIX for Advanced & Expert Users
Hi,
I want to trim +with leading zero's with amount fields.I know using awk for trimming leading zeros with +,but I want get the entire row itself.
cat file_name |awk -F " " '{printf "%14.4f%f\n",$4}'
ex:
10 xyz bc +00000234.4500
20 yzx foxic +002456.000
Expexted
10 xyz bc... (3 Replies)
Discussion started by: mohan705
3 Replies
5. Shell Programming and Scripting
Hi I have a spaced filled file having records like below:
What I want is to read line having RT3 at position 17-19 then go to position 2651 check the 18 characters (might be space filled till 18 characters). This position should have a... (6 Replies)
Discussion started by: COD
6 Replies
6. Shell Programming and Scripting
Hi Friends,
I would like to left pad with "0's" on first column say (width six)
I have a large file with the format:
FILE:
1: ALFRED 84378 NY
8385: JAMES 88385 FL
323: SMITH 00850 TX
My output needs to be like:
000001: ALFRED 84378 NY
008385: JAMES 88385 FL
000323: SMITH... (10 Replies)
Discussion started by: sbasetty
10 Replies
7. AIX
I have to check whether AIX fills physical memory pages by zeros when they are given for a new process (or may be when they are freed from an address space, but it's hardly probable).
In other words when a process gets a new memory page, this one must be cleaned.
I've solved this issue for... (2 Replies)
Discussion started by: sokolovm
2 Replies
8. Solaris
Hello all,
The issue is
# df -h /tmp
Filesystem size used avail capacity Mounted on
swap 4.0G 4.0G 8.7M 100% /tmp
# du -sh /tmp/
87M /tmp
By now you probably will say that this is open file destriptor issue.
Well no, nothing... (2 Replies)
Discussion started by: click
2 Replies
9. Shell Programming and Scripting
I have number/strings like below
input =23412133
output = 234121330000 (depends on the number give at runtime)
i need to padd zeros based on runtime input . i tried below
printf ' %d%04d\n', "23412133";
But the precision 4 is static here how can i pass this as runtime input.
i am... (11 Replies)
Discussion started by: greenworld123
11 Replies
10. Shell Programming and Scripting
Say I have something like this to try and build a parameter string:
OPT1="This is my Option";
OPT2="/folder/file";
PARMS="-u me -J \"$OPT1\" -g \"$OPT2\"";
./script.ksh -n 1 $PARMS;
./script.ksh -n 2 $PARMS;
./script.ksh -n 3 $PARMS;
./script.ksh -n 4 $PARMS;
But this doesn't work. ... (2 Replies)
Discussion started by: Devyn
2 Replies
LEARN ABOUT CENTOS
enum_station_info_flags
ENUM
STATION_INFO_FL(9) Actions and configuration ENUM STATION_INFO_FL(9)
NAME
enum_station_info_flags - station information flags
SYNOPSIS
enum station_info_flags {
STATION_INFO_INACTIVE_TIME,
STATION_INFO_RX_BYTES,
STATION_INFO_TX_BYTES,
STATION_INFO_LLID,
STATION_INFO_PLID,
STATION_INFO_PLINK_STATE,
STATION_INFO_SIGNAL,
STATION_INFO_TX_BITRATE,
STATION_INFO_RX_PACKETS,
STATION_INFO_TX_PACKETS,
STATION_INFO_TX_RETRIES,
STATION_INFO_TX_FAILED,
STATION_INFO_RX_DROP_MISC,
STATION_INFO_SIGNAL_AVG,
STATION_INFO_RX_BITRATE,
STATION_INFO_BSS_PARAM,
STATION_INFO_CONNECTED_TIME,
STATION_INFO_ASSOC_REQ_IES,
STATION_INFO_STA_FLAGS,
STATION_INFO_BEACON_LOSS_COUNT,
STATION_INFO_T_OFFSET,
STATION_INFO_LOCAL_PM,
STATION_INFO_PEER_PM,
STATION_INFO_NONPEER_PM,
STATION_INFO_RX_BYTES64,
STATION_INFO_TX_BYTES64
};
CONSTANTS
STATION_INFO_INACTIVE_TIME
inactive_time filled
STATION_INFO_RX_BYTES
rx_bytes filled
STATION_INFO_TX_BYTES
tx_bytes filled
STATION_INFO_LLID
llid filled
STATION_INFO_PLID
plid filled
STATION_INFO_PLINK_STATE
plink_state filled
STATION_INFO_SIGNAL
signal filled
STATION_INFO_TX_BITRATE
txrate fields are filled (tx_bitrate, tx_bitrate_flags and tx_bitrate_mcs)
STATION_INFO_RX_PACKETS
rx_packets filled with 32-bit value
STATION_INFO_TX_PACKETS
tx_packets filled with 32-bit value
STATION_INFO_TX_RETRIES
tx_retries filled
STATION_INFO_TX_FAILED
tx_failed filled
STATION_INFO_RX_DROP_MISC
rx_dropped_misc filled
STATION_INFO_SIGNAL_AVG
signal_avg filled
STATION_INFO_RX_BITRATE
rxrate fields are filled
STATION_INFO_BSS_PARAM
bss_param filled
STATION_INFO_CONNECTED_TIME
connected_time filled
STATION_INFO_ASSOC_REQ_IES
assoc_req_ies filled
STATION_INFO_STA_FLAGS
sta_flags filled
STATION_INFO_BEACON_LOSS_COUNT
beacon_loss_count filled
STATION_INFO_T_OFFSET
t_offset filled
STATION_INFO_LOCAL_PM
local_pm filled
STATION_INFO_PEER_PM
peer_pm filled
STATION_INFO_NONPEER_PM
nonpeer_pm filled
STATION_INFO_RX_BYTES64
rx_bytes filled with 64-bit value
STATION_INFO_TX_BYTES64
tx_bytes filled with 64-bit value
DESCRIPTION
Used by the driver to indicate which info in struct station_info it has filled in during get_station or dump_station.
AUTHOR
Johannes Berg <johannes@sipsolutions.net>
Author.
COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 ENUM STATION_INFO_FL(9)