Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Get yesterdays date given todays date Post 302213851 by magikminox on Friday 11th of July 2008 06:56:52 AM
Old 07-11-2008
Hi Thanks for the response.

My script is as follows

#!/bin/sh

isql -U$2 -S$5 -w 200 -o/u/ap/summary << xxx
$3
use $4
go
selec *
from table where label in ($1)
and flag=0 and exercise( "E") and deal_date between "$6" and "$7"

go
xxx

$6 and $7 are the values for yesterday and tommorow
and i want them to be calculated from todays date before they are used by the script.

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Korn Shell Script - Getting yesterdays date

I need to get yesterdays date in the format yyyymmdd I can get today's date simply enough - 20031112 Is there any way to substract 1 from this easily enough in korn shell script? It has to be korn shell and not perl (20 Replies)
Discussion started by: frustrated1
20 Replies

2. Shell Programming and Scripting

yesterdays date

To get yesterays date, execute the command : TZ=aaa24 date +%Y%m%d Output format will be yyyymmdd (2 Replies)
Discussion started by: sujju1985
2 Replies

3. UNIX for Dummies Questions & Answers

How to get yesterdays julian date

Hi, Was using date +%Y%j to get current julian date. Can anyone let me know how can I get y'day's julin date. Thx Did check FAQ but couldn't find anything. Thanks. (3 Replies)
Discussion started by: er_ashu
3 Replies

4. UNIX for Dummies Questions & Answers

Need to pull Yesterdays Date...

I tried this and it works for the most part, but if the date is 20090301, it displays 20090300. YESTERDAY=$((`date +%Y%m%d` -1)) (2 Replies)
Discussion started by: cards0622
2 Replies

5. Linux

Comparing the file drop date with todays date

Daily one file will dropped into this directory. Directory: /opt/app/jt/drop File name: XXXX_<timestamp>.dat.gz I need to write a script which checks whether the file is dropped daily or not. Any idea in the script how can we compare timestamp of the file to today's date?? (3 Replies)
Discussion started by: Rajneel
3 Replies

6. Shell Programming and Scripting

how to get the yesterdays date?

Hi All, Can anybody help me to get the yesterdays date in perl script. My script is as below #!/bin/perl -w $yes=system("TZ=IST+24 date +%d-%m-%Y"); print "$yes\n"; script is writting the date but with 0 pls see the output below #!/bin/perl -w $yes=system("TZ=IST+24 date... (2 Replies)
Discussion started by: jam_prasanna
2 Replies

7. 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

8. Shell Programming and Scripting

How to list todays and yesterdays .rej files from a directory?

I am trying to display todays and yesterdays .rej files from a directory. ls -lrt *.rej | grep 'Aug 12' ; ls -lrt *.rej | grep 'Aug 13' Which is working as above. But i want take 'Aug 12' and 'Aug 13' from a variable and the command should work everyday. I am able to get todays files by... (9 Replies)
Discussion started by: GopalKrishnaP
9 Replies

9. Shell Programming and Scripting

Get yesterdays Date for Input Date

Hi, I have been trying to get the yesterdays date for the Input date I pass. I know how to do for the current timestamp but how to do for the input date. Is there any way I can convert to epoch time and do manipulations and back to human readable date? Please help Thanks ... (1 Reply)
Discussion started by: abhi1988sri
1 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
Mojo::Message::Response(3pm)				User Contributed Perl Documentation			      Mojo::Message::Response(3pm)

NAME
Mojo::Message::Response - HTTP 1.1 response container SYNOPSIS
use Mojo::Message::Response; # Parse my $res = Mojo::Message::Reponse->new; $res->parse("HTTP/1.0 200 OKx0ax0d"); $res->parse("Content-Length: 12x0ax0dx0ax0d"); $res->parse("Content-Type: text/plainx0ax0dx0ax0d"); $res->parse('Hello World!'); say $res->body; # Build my $res = Mojo::Message::Response->new; $res->code(200); $res->headers->content_type('text/plain'); $res->body('Hello World!'); say $res->to_string; DESCRIPTION
Mojo::Message::Response is a container for HTTP 1.1 responses as described in RFC 2616. EVENTS
Mojo::Message::Response inherits all events from Mojo::Message. ATTRIBUTES
Mojo::Message::Response inherits all attributes from Mojo::Message and implements the following new ones. "code" my $code = $res->code; $res = $res->code(200); HTTP response code. "message" my $message = $res->message; $res = $res->message('OK'); HTTP response message. METHODS
Mojo::Message::Response inherits all methods from Mojo::Message and implements the following new ones. "cookies" my $cookies = $res->cookies; $res = $res->cookies(Mojo::Cookie::Response->new); $res = $res->cookies({name => 'foo', value => 'bar'}); Access response cookies, usually Mojo::Cookie::Response objects. say $res->cookies->[1]->value; "default_message" my $message = $res->default_message; Generate default response message for code. "fix_headers" $res = $res->fix_headers; Make sure response has all required headers for the current HTTP version. "is_status_class" my $success = $res->is_status_class(200); Check response status class. SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::Message::Response(3pm)
All times are GMT -4. The time now is 01:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy