10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Using TZ and date gives an easy way to find out the dates one or more days ago.
Now I am in need of knowing the date one week ago.
So, now is Thursday and I want to know the date on Thursday a week ago.
Unfortunately I can only get as far back as 6 days ago
When using TZ+168 it reverts... (7 Replies)
Discussion started by: ejdv
7 Replies
2. Shell Programming and Scripting
i've been going through https://www.unix.com/answers-frequently-asked-questions/13785-yesterdays-date-date-arithmetic.html to find a cmd that will print me yesterday's date. I have found one that does it nicely
set YEST = `date '+20%y/%m/%d' | awk -F"/" '{print $1$2($3-1)}'`
as you can... (3 Replies)
Discussion started by: jack.bauer
3 Replies
3. Shell Programming and Scripting
Hi all,
I currently have a UNIX file maintenance script that runs daily as a cron job.
Now I want to change the script and create functions/sub inside it that runs on a weekly or monthly basis.
To run all the scripts' daily maintenance, I want to schedule it in cron as simply maint.sh... (1 Reply)
Discussion started by: newbie_01
1 Replies
4. Shell Programming and Scripting
Hi all,
i am looking for a method of determining the weekday when date is know (bash, if possible).
Let's say that i am looking to get the weekday for MAY 01 2011, how can i convert this into Sunday or SUN?
any suggestions? (4 Replies)
Discussion started by: gigagigosu
4 Replies
5. Shell Programming and Scripting
Hi,
I'm a novice at programming and need some help with a kornshell script I've been writting.
I have an inputdirectory with all my .shp files. In my input directory the shapefiles are named XXXX_original.shp, XXXX_UPDATE.shp ect.
In my .ksh script I have created a for loop which... (2 Replies)
Discussion started by: beery
2 Replies
6. Shell Programming and Scripting
Hi All,
Thanks in Advance.
I want a function/script which returns the weekday of the given date.
the input to the function/script is the date with format MM/DD/YYYY, it should return the weekday as 1 for sunday, 2 for monday .......7 for saturday.
ex: if the function called like this ... (14 Replies)
Discussion started by: rinku11
14 Replies
7. Shell Programming and Scripting
I am trying to write a Kornshell function that takes a string parameter which represents a filename or directory name. The function checks to see if there are any spaces in the filename or directory name and then replaces the spaces with an underscore. The returned value is a filename or directory... (1 Reply)
Discussion started by: ckrieger1
1 Replies
8. Shell Programming and Scripting
I need a KornShell script that will, among all the users currently logged on to the system, find a slot of one hour that contains the most number of users. I know how to list all the users currently logged on but how do I do anything with the times that are listed? Please help, thanks. (1 Reply)
Discussion started by: ckrieger1
1 Replies
9. Programming
Hello,
I'm currently doing some programming using the Kornshell environment. I have just been on a Unix course where our instructor gave us some coding examples. I am using one of these examples to solve a few problems.
However, the code examples use a function called 'convdate' to convert a... (10 Replies)
Discussion started by: nezster
10 Replies
10. UNIX for Dummies Questions & Answers
I've been asked to upgrade from Kornshell 88 to Kornshell 93 on a Solaris 7 box. Since my experience with Unix is limited can anyone point me in the right direction? Specifically, where can I get the files that I need to do the upgrade? Thanks. (1 Reply)
Discussion started by: Ask Me
1 Replies