Sponsored Content
Full Discussion: Yesterday's date function
Top Forums UNIX for Dummies Questions & Answers Yesterday's date function Post 60117 by Perderabo on Monday 10th of January 2005 03:42:44 PM
Old 01-10-2005
Lose that first line. Don't use the . command like that. Use the 4 lines that I posted. They assume that datecalc is on your PATH. If that's not the case, modify the third line to be a full path to datecalc.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

get yesterday's date?

Hello, using date, we can easily get today's date $ date +%y-%m-%d 06-12-08 is it possible for me to get yesterday's date using 'date', if not, is there any quick and easy way to do that? Thanks! (1 Reply)
Discussion started by: fedora
1 Replies

2. Shell Programming and Scripting

yesterday date month/date

Hi expert, I want to retrieve yesterday su log. How to calculate and assign variable value ( 06/23 ) in myVariable ? #!/bin/sh myVariable=yesterday date in month/date cat /var/adm/sulog | grep $myVariable > file.txt many thanks! (5 Replies)
Discussion started by: skully
5 Replies

3. Shell Programming and Scripting

Compare date from db2 table to yesterday's Unix system date

I am currently running the following Korn shell script which works fine: #!/usr/bin/ksh count=`db2 -x "select count(*) from schema.tablename"` echo "count" I would like to add a "where" clause to the 2nd line that would allow me to get a record count of all the records from schema.tablename... (9 Replies)
Discussion started by: sasaliasim
9 Replies

4. Shell Programming and Scripting

Getting yesterday `date`

Hi, `date` command will give the current days date. Is there any command to get the previous day date? I need the previous day value in my script. Ahamed. (1 Reply)
Discussion started by: ahamed
1 Replies

5. Shell Programming and Scripting

Need help in Shell Script comparing todays date with Yesterday date from Sysdate

Hi, I want to compare today's date(DDMMYYYY) with yesterday(DDMMYYYY) from system date,if (today month = yesterday month) then execute alter query else do nothing. The above requirement i want in Shell script(KSH)... Can any one please help me? Double post, continued here. (0 Replies)
Discussion started by: kumarmsk1331
0 Replies

6. Shell Programming and Scripting

[Solved] Replace yesterday date with today's date except from the first line

Hello, I have a file like this: 2012112920121130 12345620121130msABowwiqiq 34477420121129amABamauee e7748420121130ehABeheheei in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Discussion started by: Lilu_CK
3 Replies

7. Shell Programming and Scripting

Get yesterday date

Hi Friend, i am using OS HP-UX vvftf320 B.11.11 U 9000/800 511076331 unlimited-user license now i have used below command but it giving today's date. i need your help to get yesterdate. Please correct me. date +"%d%m%Y%H%M%S" -d "1 days ago Thanks in advance, Jewel (3 Replies)
Discussion started by: Jewel
3 Replies

8. Shell Programming and Scripting

How to get tomorrow,yesterday date from date Command

Hi I want to get tomorrow and yesterday date from date command. My shell is KSH and server is AIX. I tried several options, but unable to do. Please help on this. Regards Rajesh (5 Replies)
Discussion started by: rajeshmepco
5 Replies

9. Shell Programming and Scripting

How to append date to filename, but base it on yesterday's date?

Hello, I'd like to write a monthly archive script that archives some logs. But I'd like to do it based on yesterday's date. In other words, I'd like to schedule the script to run on the 1st day of each month, but have the archive filename include the previous month instead. Here's what I... (5 Replies)
Discussion started by: nbsparks
5 Replies

10. Shell Programming and Scripting

Shell script to compare two files of todays date and yesterday's date

hi all, How to compare two files whether they are same are not...? like i had my input files as 20141201_file.txt and 20141130_file2.txt how to compare the above files based on date .. like todays file and yesterdays file...? (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies
IO
::FILE=IO(0X1A0D0D8)(1) EN Tools IO::FILE=IO(0X1A0D0D8)(1) NAME
WMk - Website META Language Make VERSION
2.0.12 (16-Apr-2008) SYNOPSIS
wmk [-a] [-A WILDMAT] [-F WILDMAT] [-x PATH] [-X PATH] [-a] [-f] [-n] [-r] [WML-options] [path ...] wmk [-V] [-h] DESCRIPTION
This is the high-level frontend to the Website META Language (WML), a free HTML generation toolkit for Unix, internally consisting of 9 independent languages. See wml(1) for more details on WML. Use this command to run wml on a bunch of .wml files either directly given on the command line as path or found via directory traversal in path. WMk recognizes WML's shebang lines (``"#!wml" options'') in the .wml files and automatically adds options to the command line of wml when invoking it for this particular file. OPTIONS
-a, --all Specifies that WMk should recursively process all .wml files it finds in path. -A, --accept=WILDMAT Accepts (=includes) all files matched by the shell wildcard pattern WILDMAT for processing. WMk always has a pre-configured ``"-A *.wml"'' option which forces it to process all WML files per default. This option is only used when path is a directory. -F, --forget=WILDMAT Forgets (=exclude) all files and directories matched by the shell wildcard pattern WILDMAT which were previously accepted by option -A. -o, --outputfile=PATH Specifies output files. When this flag is used in .wmlrc, the same flag must be put in .wmkrc to let WMk know when to rebuild these output files. -x, --exec-prolog=PATH Executes PATH in the local context of path before the WML commands are run. This options is only used when path is a directory. -X, --exec-epilog=PATH Executes PATH in the local context of path after the WML commands are run. This options is only used when path is a directory. -f, --force Forces the creation of output files. Usually WMk tries to determine if the input file was really modified and skips WML invocations if the output files are still up-to-date. -n, --nop Sets no-operation (nop) where WMk runs as usual but does not actually invoce the wml commands. Use this option to see what wmk would do. -r, --norcfile This forces WMk to ignore all .wmkrc and WML to ignore all .wmlrc files. -V, --version Gives the version identification string of WMk. Use this to determine the version of a installed WML toolkit. -h, --help Prints the usage summary page. All WML-options directly correspond to their counterparts in wml(1) because they are just forwarded by wmk except the -n and -o options which are implicitly created by wmk for each wml invocation. USER FILES
$HOME/.wmkrc and (../)*.wmkrc These files can also contain option strings, one option per line. One may use this file to exclude some directories from being searched for input files -F images -F templates ... CAVEAT
Auto-adjusted variables specfied as -DNAME~PATH on the wmk command-line will not necessarily have the same effect as a similar definition in a ./.wmlrc file. This is because, when processing sub-directories, wmk changes its working directory to each of those directories, which can influence the interpolation of such auto-adjusted variables. When specified on the command line, such variables are interpolated with respect to wml's current working directory at the time of its invocation. So, if you wish such variables to be interpolated relative to wmk's current working directory at the time of its invocation, one can work-around this issue by specifying -DNAME~PATH in a .wmlrc in that directory rather than specifying it on the wmk command-line. AUTHORS
Ralf S. Engelschall rse@engelschall.com www.engelschall.com Denis Barbier barbier@engelschall.com SEE ALSO
wml(1), wml_intro(1) EN Tools 2014-04-16 IO::FILE=IO(0X1A0D0D8)(1)
All times are GMT -4. The time now is 10:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy