I don't know whether the ksh on your AIX system is recent enough to support this, but it is worth a try.
The version 5.3 which thread-owner showed is already out of support, but the following is true for the latest versions (7.1) either:
AIX uses a ksh88 as the default system shell (/bin/ksh), but comes with a ksh93 per default. One will have to use /bin/ksh93 to access it, though.
I hope this helps.
bakunin
PS: sitting at my office keyboard now i am able to expand on that:
The basic system default shell is a ksh88 and its version string is: Version M-11/16/88f. This has not changed in ages and is true for probably all the AIX systems you will ever encounter, because i doubt you will have a chance to see a pre-3.2.5-system running somewhere.
The /bin/ksh93 produces the version string Version M 93t+ 2009-05-01 issued from a 7.1-system patched to the latest level. I cannot check on any 5.3-system (they are out of support and we do not have any), but IIRC the later releases of 5.3 used the same ksh93 version. 6.1 definitely does.
This is still confusing. "03_ok" and "04_ko" appear to be strings (and are clearly not empty strings). Are they the names of subdirectories in the current directory? Are they the names of variables that expand to absolute pathnames of directories? Are they the names of variables that expand to relative pathnames of directories?
What do you mean by != empty? Do you mean that the directory to which they refer does not contain any files other than . and .., does not contain any files with names ending in .csv, or something else (and, if so, what)?
What is another position to which files are to be copied?
You have references to *.csv and *.cvs. Are the references to *.cvs supposed to be *.csv, or do you really have files with both suffixes?
It sounds like you have a directory that contains some .csv (or .cvs or both) and you want to copy those files from one directory into a tar archive, then you want to try to copy those same files to another directory and then copy the same file to a third or fourth directory depending on whether the 2nd copy succeeded or failed. Do you really need four copies of each of these files (or were one or more of the copy it to statements intended to be move it to)?
Last edited by Don Cragun; 12-23-2013 at 03:34 AM..
Reason: fix typo.
Hi, I need the first & last day of a month from any given date. For better understanding, if i need to back-fill data for date 07/20/2019 i.e July 20 2019, i need the first & last day has 07/01/2019 - 07/31/2019. FYI: I'm using GIT BASH terminal.
sample code:
export DT=$(date --date='6 days... (2 Replies)
I am running a script in ksh to get the 2 months back date from system date.The below code is giving correct date output from putty command prompt.But while running the script is .ksh file it is giving the error below.Please suggest.
; d=a; y=a
m-=num
while(m < 1) {m+=12; y--}... (1 Reply)
I have a homework assignment:
----------------------------------------
"Display" the number of days in the current month. For example:
September 1996 has 30 days
----------------------------------------
I am trying to just display the head of cal to start the sentence.
eg. cal | head
... (1 Reply)
I have requirment to get last date of previous month and the first date of previous 4th month:
Example:
Current date: 20130320 (yyyymmdd)
Last date of previous month: 20130228 (yyyymmdd)
First date of previous 4th month: 20121101 (yyyymmdd)
In my shell --date, -d, -v switches are not... (3 Replies)
How could we derive teh Next month in MON-RR format from current date ie sysdate in UNI AIX sheel script.I coould get a command but i supports only inLinux susse andnotin AIX.
I need for Unix AIX.Pls Help.
Regards
Shiv (2 Replies)
Hi,
i unable to get the last month date in AIX.
current date - one month
Based on the forums tried but did not find the relevent information.
Any help grealy appriciated.
Thanks
Suri. (3 Replies)
Hi Gurus,
I'm using HP-UX B.11.23 operating system.
I've been trying to extract this log info based on the current date and month, but was having some issues as the date column which on the 4th column has a comma and the 5th column has a dot tied to it.
Here is the output from my shut... (5 Replies)
Hi All,
I want to find the time diffrence between currnt time and "abc.txt" file create time.
I have solve that but if the abc.txt file created last month then is there any process to find the difftent?
Exp:
Create time of abc.txt is "Apr 14 06:48"
and currect date is "May 17 23:47".... (1 Reply)
i want to delete files that are one day old
condition is files should be of current month only ie if iam running script on 1 march it should not delete files of 28 feb(29 if leap year :-)}
any modifications to
find $DIR -type f -atime +1 -exec rm -f{}\; (4 Replies)