02-27-2006
OOOp ! one more question ?
If I would like to sort it , how to I sort and remove the duplicate line in file
print $1$2$3".dat" ???, i dont want to sort for vote.dat because yyyyddmm.dat need to be sorted and uniq -d this file , how do you do it ?
Thanks.
==========
#! /usr/bin/ksh
while IFS=\| read a b c d
do
print $a\|$b\|$c\|$d >> $(print "$c" | nawk -F[-\ ] '{print $1$2$3".dat"}')
done < vote.dat
==========
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 DEBIAN
lfc-dli-client
LFC-DLI-CLIENT(1) User Commands LFC-DLI-CLIENT(1)
NAME
lfc-dli-client - lists the replicas for a given LFN, GUID via the DLI Interface
SYNOPSIS
lfc-dli-client [ --endpoint endpoint ] [ -h || --help ] [ -v || --verbose ] logical file
DESCRIPTION
lcg-dli-client lists the replicas for a given LFN or GUID using the Data Location Interface (DLI) Web service for a LFC Server.
logical file
a URI which specifies the Logical File Name ( lfn: ) or the Grid Unique IDentifier ( guid: ).
endpoint
specifies a web service endpoint to connect to. This consists of a http URL with a hostname and an optional port number. An example
is http://lfc-dteam.cern.ch:8085/
NOTE
The environment variable LFC_HOST may be set instead of specifying an endpoint to use. Also, DLI_PORT may be used if the DLI is running
on a non-standard port. If DLI_PORT is not specified, the client defaults to port 8085.
EXAMPLE
lfc-dli-client -e http://lfc-dteam-test:8085/
lfn:/grid/dteam/dli-test
sfn://lxb1533.cern.ch/storage//dteam/generated/2005-12-05/
filed88f9c0b-1fba-40a4-b20e-66866d757643
srm://lxb0724.cern.ch/pnfs/cern.ch/data/dteam/generated/
2005-12-05/file9fd93cae-6400-4798-b4e9-2605bf31a7ff
srm://lxb1921.cern.ch/dpm/cern.ch/home/dteam/generated/
2005-12-05/file73c497d2-deed-46c8-b747-cda06c7708cb
EXIT STATUS
This program returns 0 if the operation was successful or >0 if the operation failed.
SEE ALSO
lcg_util(3), lcg-lr(3), lfc-dli(3)
LCG
$Date: 2005/12/05 15:47:44 $ LFC-DLI-CLIENT(1)