02-24-2006
Out put with select date. Help !!!
If I have a flatfile like vote.dat
NAME | SEX | DATETIME | VOTE
Jason|M|2005-12-10 08.01.30|Y
Benson|M|2005-12-10 12.01.00|Y
William|M|2005-12-10 08.01.09|Y
Nick|M|2005-12-11 09.01.07|Y
Pascal|M|2005-12-11 01.01.06|Y
Mickey|F|2005-12-12 12.01.30|Y
How can I write a korn script to have the out put files depend on the date like
20051210.dat
Jason|M|2005-12-10 08.01.30|Y
Benson|M|2005-12-10 12.01.00|Y
William|M|2005-12-10 08.01.09|Y
20051211.dat
Nick|M|2005-12-11 09.01.07|Y
Pascal|M|2005-12-11 01.01.06|Y
20051212.dat
Mickey|F|2005-12-12 12.01.30|Y
Thanks,
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I want to copy a file to another file so that the current time and date are in the file name. For example I want to copy file profit.txt to a file name in the format
of profit_YYYYMMDDHHmm.txt where YYYY is year, MM is number of the month DD is the number of day of the month, HH is the hour of... (2 Replies)
Discussion started by: jhamm
2 Replies
2. Shell Programming and Scripting
#!/bin/ksh
if test -f file6.txt
then
rm file6.txt
fi
a=`date +"%F"`
awk '{print $0,"$a"}' file3.txt > file6.txt
-----------------------------------------------------------------
i need to append date at the end of each line in file 3 and o/p it to file6.txt (3 Replies)
Discussion started by: ali560045
3 Replies
3. Shell Programming and Scripting
1.56.253.48 - - "GET "
1.6.253.48 - - "GET "
1.65.253.48 - - "GET "
1.65.253.48 - - "GET "
1.63.53.48 - - "GET "
1.65.253.48 - - "GET "
1.16.23.48 - - "GET "
1.64.25.48 - - "GET "
need command which give the output
1.6.253.48 - 09/Nov/2009:07:02:24
1.65.253.48 -... (7 Replies)
Discussion started by: sagar_evc
7 Replies
4. Programming
Hi Guys,
Can someone please help me on adding/inserting a variable to an sql scipt? Basically I want to assign today's date. As shown below..
set head off;
set linesize 300;
set pagesize 200;
spool /opt/oracle/temp/output.txt
select value,count(*) as totalcount from pmowner.pinpebasev... (11 Replies)
Discussion started by: pinpe
11 Replies
5. Shell Programming and Scripting
Hi Guys,
Can someone please help me on adding/inserting a variable date to an sql scipt? Basically I want to assign a 7 days date range. As shown below..
#!/usr/bin/perl
use strict;
use Env qw(ORACLE_HOME);
my $SQLPLUS='/opt/oracle/product/10.1.0/db_1/bin/sqlplus -S... (1 Reply)
Discussion started by: pinpe
1 Replies
6. UNIX for Dummies Questions & Answers
Hi guys,
brand new to this thread and very very new to UNIX...so go easy please!
Anyway I have a file that looks like this:
>>--------------------------------------------------------------------------
Date/Time/Eng. : 2012-06-22 / 00:26 / DS
Reported problem : (SD) ... (5 Replies)
Discussion started by: martin0852
5 Replies
7. Shell Programming and Scripting
Hi all,
Before I give up on using SELECT for my first attempt at creating a menu driven script, can anyone please advise if it is possible to include a line break for PS3, I've tried putting in a \n and it does not work.
Tried for both bash and ksh and both gives the same result. Preference... (3 Replies)
Discussion started by: newbie_01
3 Replies
8. UNIX for Dummies Questions & Answers
Hi All,
<Re-posting in Correct group>
I'm trying to select all the files in a folder that starts with a particular name format and are created in a gven date range using 'ls' command...but i'm not successful....
Example : I'm trying to see all the text files in a folder who names start... (6 Replies)
Discussion started by: Satya C1
6 Replies
9. Shell Programming and Scripting
I have written three database queries to extract data from yesterday, last week and last month. I need a way to name the output files something like this :
"Daily 2014-05-21", "Weekly 2014-05-19" & "Monthly 2014-05-01" if I run them today ( 2014-05-22 ).
I can specify the output file name from... (5 Replies)
Discussion started by: djohnson123
5 Replies
LEARN ABOUT CENTOS
cmciclientft.getinstance
3(2005-06-09) 3(2005-06-09)
NAME
CMCIClientFT.getInstance() - Get class instance
SYNOPSIS
#include <cmci.h>
CMPIInstance*
CMCIClientFT.getInstance(CMCIClient*cl,
CMPIObjectPath*op,
CMPIFlagsflags,
char**properties,
CMPIStatus*rc);
DESCRIPTION
Get class instance using op as reference. The content of the returned class instance structure can be controled using the flags parameter.
Arguments are the client object pointer cl, ObjectPath object pointer op that contains namespace and classname components, flags to affect
the returned class instance structure content,
properties array, and rc which returns the operation status (suppressed when NULL).
The flags argument is a bit mask that can contain combinations of the following flags - CMPI_FLAG_LocalOnly, CMPI_FLAG_IncludeQualifiers,
and CMPI_FLAG_IncludeClassOrigin.
The properties array defines what properties should be returned for the class. If this argument is not NULL, only the class properties in
the list are returned. If it's NULL all class properties are returned.
RETURN VALUE
When successful the CMCIClientFT.getInstance() function returns a pointer to a CMPIInstance object and sets a successful status code for
rc. When unsuccessful it returns NULL and sets the rc argument with the error code and and corresponding error string.
ERRORS
EXAMPLES
CONFORMING TO
SEE ALSO
Common Manageability Programming Interface (CMPI) - OpenGroup,
CMCIClient(3), CMPIInstance(3), CMPIObjectPath(3), CMPIFlags(3), CMPIStatus(3)
SFCBroker Client Library sfcc 3(2005-06-09)