Grappling with the y3k problem and filling in the missing months left as an exercise. Are dates less than ten space-padded or zero-padded, or not padded at all?
I have the following script to find out the last day of the last month .... and the output of this script is in the following format ...
Script goes like this ....
#!/bin/ksh
cur_month=`date +%m`
cur_year=`date +%Y`
prev_month=$(($cur_month-1))
# Check to see if this is January
if ... (8 Replies)
Hey all,
I have a shell that invokes a AWK.
In this AWK i want invoke a function that receives 3 parameters:
date: 20080831
time: 235901
duration: 00023
that function receive this 3 parameters and sum to this value two more seconds:
2008083123590100025
Remember that in case that... (3 Replies)
Dear friends, following is the output of a script from which I want to remove spaces and new-line characters.
Example:-
Line1 abcdefghijklmnopqrstuvwxyz
Line2 mnopqrstuvwxyzabcdefghijkl
Line3 opqrstuvwxyzabcdefdefg
Here in above example, at every starting line there is a “tab” &... (4 Replies)
AIX 4.2
I am trying to do an rsh grep to search for date records inside server logs by doing this :
xx=`date +"%a %b %d"`
rsh xxx grep "^$XX" zzz
gives :
grep: 0652-033 Cannot open Jun.
grep: 0652-033 Cannot open 11.
But if I do :
xx=`date +"%a %b %d"`
grep "^$XX" zzz
it works... (2 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hello everyone
Sorry I have to add another sed question. I am searching a log file and need only the first 2 occurances of text which comes after (note the space) "string " and before a ",". I have tried
sed -n 's/.*string \(*\),.*/\1/p' filewith some, but limited success. This gives out all... (10 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Hi,
I want to transform a txt file to make a new one. I want to remove the ".0" of the dates only (after the time, there is ".0" that I dont need.
I.e
1480.1 1.0 1.0 2012-07-08 23:38:11.0 2012-07-08 23:40:14.0
I want to transform this line to get this new one...
1480.1 ... (3 Replies)
I am trying to remove "forward shash" using sed it was not working
666,server1, 00973 N/A RDF1+TDEV RW 1035788
i need to remove " N/A" and "RW"
I need output
666,server, 00973 , RDF1+TDEV , 1035788 (4 Replies)
Discussion started by: ranjancom2000
4 Replies
LEARN ABOUT OPENSOLARIS
mlib_imagesetpaddings
mlib_ImageSetPaddings(3MLIB) mediaLib Library Functions mlib_ImageSetPaddings(3MLIB)NAME
mlib_ImageSetPaddings - set paddings
SYNOPSIS
cc [ flag... ] file... -lmlib [ library... ]
#include <mlib.h>
mlib_status mlib_ImageSetPaddings(mlib_image *img, mlib_u8 left,
mlib_u8 top, mlib_u8 right, mlib_u8 bottom);
DESCRIPTION
The mlib_ImageSetPaddings() function sets new values for the paddings field of the mlib_image structure as follows:
img->paddings[0] = left;
img->paddings[1] = top;
img->paddings[2] = right;
img->paddings[3] = bottom;
By default, an image structure creation function, such as mlib_ImageCreate(), mlib_ImageCreateStruct(), or mlib_ImageCreateSubimage(), sets
the paddings field of the mlib_image structure as follows:
img->paddings[0] = 0;
img->paddings[1] = 0;
img->paddings[2] = 0;
img->paddings[3] = 0;
Note that this function is needed only when the edge condition MLIB_EDGE_SRC_PADDED is used.
The mlib_image->paddings field denotes the amount of paddings on each side of an image, from which the real image border can be seen. When
MLIB_EDGE_SRC_PADDED is specified as the edge condition, a geometric function uses the "real" source image border for clipping the destina-
tion image.
PARAMETERS
The function takes the following arguments:
img Pointer to image data structure.
left Number of columns padded on the left side.
top Number of rows padded on the top.
right Number of columns padded on the right side.
bottom Number of rows padded at the bottom.
RETURN VALUES
The function returns MLIB_SUCCESS if successful. Otherwise it returns MLIB_FAILURE.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO mlib_ImageGetPaddings(3MLIB), mlib_ImageCreate(3MLIB), mlib_ImageCreateStruct(3MLIB), mlib_ImageCreateSubimage(3MLIB),
mlib_ImageAffine(3MLIB), attributes(5)SunOS 5.11 2 Mar 2007 mlib_ImageSetPaddings(3MLIB)