I am planning to use the 1st solution, but it I had a little concern, will this command work if unix admin apply some patch in future? Or should I be using the script that I created since it only uses very basic commands??
Appreciate your reply on this.
Also I have modified the command little bit to suit my needs as follows:
Note: MonthID here will be set by output of another ETL process.
Appreciate your reply on my questions.
There shouldn't be any reason to avoid the above constructs on your current or future releases of AIX. You can also get rid of the 1st command in your script:
#!/bin/ksh
month=`date | cut -c5-8`
year=`date | cut -c24-28`
echo "$month"
echo "$year"
--- This gives me output as Feb and 2009
but now I want to substract the 1 month from the current script and want output as
Jan 2009.
Please note I have searched a lot on forum and found... (5 Replies)
We have a list of files (raw and jpeg types) with 2 different extensions (rw2 and jpg).
When there is both the raw and jpeg files, their file numbers must be the same (215 and 215, 218 and 218).
Sometimes there is only the jpeg file (216,217).
bla_215.rw2
bla_215.jpg
bla_216.jpg
bla_217.jpg... (9 Replies)
Please guide if you know how to solve this.
I have a tab delimited INPUT FILE where each record is separated by -----
-----
ABC 4935402 4936680 Pattern=Cheers07080.1
ABC 4932216 4932368 Pattern=Cheers07080.1
ABC 4931932 4932122 ... (8 Replies)
I've start and end time in two columns. How can I substract time from column 2 and column 1 and receive output in another file 'd' ?
$ cat c
12:55:04 2:03:56
2:03:56 3:20:17
14:00:00 13:05:00 (1 Reply)
Hi everyone,
I have a file containing one column and I want to subtract the first value (value of first line) from each line's value.
79304
99299
119294
139289
159284
179279
199274
219269
239264
259259
279254
299249
319244
339239
359234I tried working on an awk solution with... (1 Reply)
Hello All,
I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer.
Any ideas would be appreciated! (5 Replies)
Hello,
i`m looking for some way to add to some date an partial number of months, for example to 2015y 02m 27d + 2,54m
i need to write this script in php or bash or sh or mysql or perl in normal time o unix time
i`m asking or there are any simple way to add partial number of month to some... (14 Replies)
Hi,
I need all file names in a folder which has date >= 10th of last month,
Example
: files in folder
AUTO_F1_20140610.TXT
BUTO_F1_20140616.TXT
CUTO_F1_20140603.TXT
FA_AUTO_06012014.TXT
LA_AUTO_06112014.TXT
MA_AUTO_06212014.TXT
ZA_AUTO_06232014.TXT
Output:
AUTO_F1_20140610.TXT... (9 Replies)
Discussion started by: nani1984
9 Replies
LEARN ABOUT ULTRIX
nl_langinfo
nl_langinfo(3int)nl_langinfo(3int)Name
nl_langinfo - language information
Syntax
#include <nl_types.h>
#include <langinfo.h>
char *nl_langinfo (item)
nl_item item;
Description
The function returns a pointer to a null-terminated string containing information relevant to a particular language or cultural area. The
language is identified by the last successful call to the appropriate category. The categories are shown in the following table and are
defined in
For instance, the following example would return a pointer to the string representing the abbreviated name for the first day of the week,
as defined by category
nl_langinfo (ABDAY_1);
If the category has not been called successfully, data for a supported language is not available, or is not defined, then returns a pointer
to an empty (null) string. In the C locale, the return value is the American English string defined in the following table:
-----------------------------------------------------------------------
Identifier Meaning C locale Category
-----------------------------------------------------------------------
NOSTR Negative response no LC_ALL
YESSTR Positive response yes LC_ALL
D_T_FMT Default date and time format %a %b %d
%H:%M:%S %Y LC_TIME
D_FMT Default date format %m/%d/%y LC_TIME
T_FMT Default time format %h:%m:%s LC_TIME
DAY_1 Day name Sunday LC_TIME
DAY_2 Day name Monday LC_TIME
.... .... .... ....
DAY_7 Day name Saturday LC_TIME
ABDAY_1 Abbreviated day name Sun LC_TIME
ABDAY_2 Abbreviated day name Mon LC_TIME
ABDAY_3 Abbreviated day name Tue LC_TIME
.... .... .... ....
ABDAY_7 Abbreviated day name Sat LC_TIME
MON_1 Month name January LC_TIME
MON_2 Month name February LC_TIME
MON_3 Month name March LC_TIME
.... .... .... ....
MON_12 Month name December LC_TIME
ABMON_1 Abbreviated month name Jan LC_TIME
ABMON_2 Abbreviated month name Feb LC_TIME
.... .... .... ....
ABMON_12 Abbreviated month name Dec LC_TIME
RADIXCHAR Radix character . LC_NUMERIC
THOUSEP Thousands separator LC_NUMERIC
CRNCYSTR Currency format LC_MONETARY
AM_STR String for AM AM LC_TIME
PM_STR String for PM PM LC_TIME
EXPL_STR Lower case exponent character e LC_NUMERIC
EXPU_STR Upper case exponent character E LC_NUMERIC
-----------------------------------------------------------------------
See Alsointro(3int), ic(1int), setlocale(3int), environ(5int), nl_types(5int)
Guide to Developing International Software
nl_langinfo(3int)