Hi
Can anyone tell me how to pad zeroes on the left side to a numeric string in unix shell scripting
Your answer is very much appreciated
Thanks
Vijay (2 Replies)
Is there a function in c that will allow me to pad variables?
I have an int that can't be longer than 10. I need to pad a numeric value with leading zeros
314
0000000314 (1 Reply)
I have a file with different character counts on each line
how do i make it with unique character counts.
example:
1st line : ABCD 011 XYZ 0000 YYYY BBB TEADINGDA
2nd line: ABCD 011 xys 0010 YYYY BBB TEAD
3rd line : ABCD 022 YXU 000 UUU BBB TE
1st line is 43... (3 Replies)
In my server migration requirement, I need to compare if one file on old server is exactly the same as the corresponding file on the new server.
For diff and comm, the inputs need to be sorted. But I do not want to disturb the content of the file and need to find byte-to-byte match.
Please... (4 Replies)
Hi All
Can anyone please suggest me how to remove the last byte from a falt file .This is from the last line's last BYTE.
Please suggest me something.
Thank's and regards
Vinay (1 Reply)
I have a file with records containing dates like:
SMPBR|DUP-DO NOT USE|NEW YORK||16105|BA5270715|2007-6-6|MWERNER|109||||JOHN||SMITH|MD|72211118||||||74559|21 WILMINGTON RD||D|2003-11-6|SL# MD CONTACT-LIZ RICHARDS|||0|Y|N||1411458|
How can I get the date fields in each of my records to be... (1 Reply)
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)
hi All
i am new to linux...
source txt ..
281-BUM-5M BUM-5M 0 0
282-BUM-5M BUM-5M 0 0
83-BUM-5M BUM-5M 0 0
is it possible to use bash script to convert to
(remove the "-" and fill up to 4 digit" ?
0281 BUM-5M BUM-5M 0 0
0282 BUM-5M BUM-5M 0 0
0083 BUM-5M BUM-5M 0 0
thanks a ... (5 Replies)
Hi all
Is there a way to pad the output of a bash script
see that code below
for i in `sed -n '/Start Printer/,/End Printer/p' /u/ab/scripts/hosts.conf | awk '!/^#/ {print $2}' | egrep -v 'broke|primera' `; do
pages=`snmpget -Ov -v1 -c public $i sysLocation.0 | awk '{print $2}'`
... (3 Replies)
I have this csv file that I would like to sort on the 20th and 21st field. They are high lighted below. My challenge is that when I sort on those fields they are not in order as I would have liked. It seems like I have to pad those fields to the longest value in that fields data.
... (6 Replies)
Discussion started by: GroveTuckey
6 Replies
LEARN ABOUT HPUX
dtdts
Dt/Dts.h(file formats) Dt/Dts.h(file formats)
NAME
Dt/Dts.h -- data typing definitions
SYNOPSIS
#include <Dt/Dts.h>
DESCRIPTION
The Dt/Dts.h header declares the following structure:
typedef struct _DtDtsAttribute {
char *name;
char *value;
} DtDtsAttribute;
The header declares the following as functions:
DtDtsAttribute **DtDtsBufferToAttributeList(const void *buffer,
const int size,
const char *opt_name);
char *DtDtsBufferToAttributeValue(const void *buffer,
const int size,
const char *attr_name,
const char *opt_name);
char *DtDtsBufferToDataType(const void *buffer,
const int size,
const char *opt_name);
char *DtDtsDataToDataType(const char *filepath,
const void *buffer,
const int size,
const struct stat *stat_buff,
const char *link_path,
const struct stat *link_stat_buff,
const char *opt_name);
int DtDtsDataTypeIsAction(const char *datatype);
char **DtDtsDataTypeNames(void);
DtDtsAttribute **DtDtsDataTypeToAttributeList(const char *datatype,
const char *opt_name);
char *DtDtsDataTypeToAttributeValue(const char *datatype,
const char *attr_name,
const char *opt_name);
DtDtsAttribute **DtDtsFileToAttributeList(const char *filepath);
char *DtDtsFileToAttributeValue(const char *filepath,
const char *attr_name);
char *DtDtsFileToDataType(const char *filepath);
char **DtDtsFindAttribute(const char *attr_name,
const char *attr_value);
void DtDtsFreeAttributeList(DtDtsAttribute **attr_list);
void DtDtsFreeAttributeValue(char *attr_value);
void DtDtsFreeDataType(char *datatype);
void DtDtsFreeDataTypeNames(char **namelist);
void DtDtsLoadDataTypes(void);
void DtDtsRelease(void);
char *DtDtsSetDataType(const char *dirpath,
const char *datatype,
const int override);
Dt/Dts.h(file formats)