Sponsored Content
Full Discussion: customised filename
Top Forums UNIX for Dummies Questions & Answers customised filename Post 77554 by vino on Monday 11th of July 2005 01:51:04 AM
Old 07-11-2005
Quote:
Originally Posted by vasikaran
Hi,

I am taking an output and redirecting it to a file name

and this is a hourly or daily process , in this case, i want my file output as

some logoutput_date_time.txt

how can i form the file name like this

for eg

i am running this command now, so

tail -f /data/logs/xxx/yyy.txt >>logoutput_11072005_1125.txt

what shd i do to get the file name like this,
Code:
tail -f /data/logs/xxx/yyy.txt >>logoutput_$(date +%d%M%Y_%H%M).txt

Check out man date for other options.

vino
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

customised functions...

I am going to build some commands/functions for common tasks that I have to perform (things like searching a filesystem for a certain string in a file). I intend to write these as unix scripts. Then adding the location of these to my path. How can I ensure that the variables specified when... (7 Replies)
Discussion started by: peter.herlihy
7 Replies

2. UNIX for Dummies Questions & Answers

shortcut for tar cvf - [filename] | gzip > [filename].tar.gz

i'd like to have an alias (or something similar) where i can type a command like "archive" and a filename and have it tar and gzip the file, so... $ archive filename results in filename.tar.gz...do i have to write a script to do this? (4 Replies)
Discussion started by: bcamp1973
4 Replies

3. Red Hat

running customised firewall -RHEL 4

I have created a custom firewall script in RHEL 4 .Let me explain the steps which i followed . etho -Internal lan eth1 -External lan During the installtion of RHEL 4 ,i enabled Firewall and after booting to x windows i selected enable firewall and defined the defined and customised ports... (0 Replies)
Discussion started by: sud.tech
0 Replies

4. Shell Programming and Scripting

gzcat into awk and then change FILENAME and process new FILENAME

I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies

5. Shell Programming and Scripting

rename multiple filename.45267.txt to >> filename.txt

i have several thousand files and in subdirs that are named file.46634.txt budget.75346.pdf etc i want to remove the number but retain the extension. it is always a 5 digit. thanks. (6 Replies)
Discussion started by: jason7
6 Replies

6. Shell Programming and Scripting

Filename from splitting files to have the same filename of the original file with counter value

Hi all, I have a list of xml file. I need to split the files to a different files when see the <ko> tag. The list of filename are B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml ... (3 Replies)
Discussion started by: natalie23
3 Replies

7. Red Hat

Customised Output

I want some customised output of following command: $ls -a|sort gives output as filenames line by line. But I want the output as filenames aeperated by tab? How can I get this? Thanks in advance. (7 Replies)
Discussion started by: ashok.g
7 Replies

8. Shell Programming and Scripting

customised error message..

Hi, Below is the script that takes some value from the properties file and then move the file from files folder to output folder based upon the modification time of files(configurable N days value),now at the end I want to show a customised message that if no files are moved then it shows the... (1 Reply)
Discussion started by: rahul125
1 Replies

9. UNIX for Dummies Questions & Answers

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My Requirement: 1) There are some set of files in a directory like given below OTP_UFSC_20120530000000_acc.csv OTP_UFSC_20120530000000_faf.csv OTP_UFSC_20120530000000_prom.csv... (0 Replies)
Discussion started by: aealexanderraj
0 Replies

10. Programming

to extract all the part of the filename before a particular word in the filename

Hi All, Thanks in Advance I am working on a shell script. I need some assistance. My code: if then set "subscriber" "promplan" "mapping" "dedicatedaccount" "faflistSub" "faflistAcc" "accumulator"\ "pam_account"; for i in 1 2 3 4 5 6 7 8;... (0 Replies)
Discussion started by: aealexanderraj
0 Replies
LR_CRON.IN(1)						  LogReport's Lire Documentation					     LR_CRON.IN(1)

NAME
lr_cron - run the perodical jobs configured in a DlfStore. SYNOPSIS
lr_cron period store DESCRIPTION
lr_cron is designed to be called in a crontab(5) entry. period should be "hourly", "daily", "weekly", "monthly" or "yearly". store should be the full path name of the DLF Store. lire(1) should be used to configure periodical jobs in the store. To run jobs as scheduled by lire(1), you will need to setup cron jobs. For each schedule you use, you should configure a cron job to be executed according to that period. Here is a crontab(5) entry that will make sure that all possible schedules are supported in the /home/flacoste/myStore DLF store: 05 * * * * lr_run lr_cron hourly /home/flacoste/myStore 15 01 * * * lr_run lr_cron daily /home/flacoste/myStore 15 02 * * 02 lr_run lr_cron weekly /home/flacoste/myStore 15 03 01 * * lr_run lr_cron monthly /home/flacoste/myStore 15 04 01 01 * lr_run lr_cron yearly /home/flacoste/myStore . SEE ALSO
lire(1) AUTHOR
Francis J. Lacoste <flacoste@logreport.org> VERSION
$Id: lr_cron.in,v 1.37 2006/07/23 13:16:32 vanbaal Exp $ COPYRIGHT
Copyright (C) 2004 Stichting LogReport Foundation LogReport@LogReport.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see COPYING); if not, check with http://www.gnu.org/copyleft/gpl.html. Lire 2.1.1 2006-07-23 LR_CRON.IN(1)
All times are GMT -4. The time now is 03:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy