Shell script to use the last modified filename in a variable
Forgive me if this is a trivial question, but I haven't been able to find the answer to this.
Basically I've got a list of files in a particular directory that have the general form t_*.dat. (I have other files in the same directory as well).
Essentially what I want to do is obtain the name of the last modified file in this directory that start with t_* and use that name as a variable in my shell script.
I know that the following command will give me the file in a terminal
But how could I use the name of this file in a variable, say $filename.
(Later on, I want to use this filename to plot data using gnuplot.)
Thanks.
Can we can pass the filename as variable in the shell script.
Sending the filename as a parameter file, the shell script takes the filename, needs to replace the string containing the filename with the variable in the shell script.
EX: test1.sh is the shell script and takes file1.csv as... (6 Replies)
hi all,
I need to find out the last 2 modified files in a folder.There is some way by which,we can check the timestamp and find out..??please help this is urgent.
Thanks in Advance
Anju (3 Replies)
Hi,
I am currently using the following command:
files=(ls enuCPU??.????.exp ntuCPU??.????.exp)
I need to now change the commmand to store the file names of files that have been modified before datetime equal to say '02/16/2008 20:30:00'
What could I use? (2 Replies)
Hi,
When we use "ls -l" we are getting like below,
-rw-r--r-- 1 mdskl mds 4161479 Apr 12 14:57 VTTF2008.20080412145748.cc
But i need only modified time and filename only like below,
Apr 12 14:57 VTTF3008.20080412145748.cc
Thanks-:)
Senthil (4 Replies)
Hi guys,
-could any one help me with this (I'm new to UNIX)
how to write a shell script that tell me the last modified file in the current directory?
so if I run the script in a diferent directory,will work.
and can I write the script by C++ language and run it in the shell ?
I tried... (5 Replies)
I would like to know, whether is there any command/tool in Linux (something like Oracle Trigger function) to send a mail if a particular shell script has been modified with details like, modification time, modified by, etc.
Thanking in advance, (1 Reply)
Hi,
I want to modify a filename in AIX by attaching the last modified timestamp. I want the timestamp completely in numerical format (eg:200905081210. yr-2009, mnth - 05, date -08, hr - 12, mins - 10).
For example if the filename is a.log and it was modified on April 6th 2008 at 21.00. I... (16 Replies)
I am having some trouble with a shell script I am writing. In the program I pass the path of where certain file names exist. I then want to loop through each file name and pass it as a DATA variable when calling sqlldr for a control file. This is what I have:
ls $FILEPATH/${FILENAME}*.csv
... (4 Replies)
Hi ,
I want a script who will send alert the moment someone edit any file in a directory in LINUX. Can some one throw some light on this please.!! (4 Replies)
Hi,
I have a directory that has numerous files in it, and there is two which are named "filerec_ddmmyyHH24MMSS" by the time they are created so "filerec_010615012250" was created at 01:22:50 on 1st June 2015.
I need to find the most recently created of those 2 files and get the contents of... (4 Replies)
Discussion started by: finn
4 Replies
LEARN ABOUT DEBIAN
aida2flat
AIDA2FLAT(1) User Commands AIDA2FLAT(1)NAME
aida2flat - Convert AIDA data files to a flat format
SYNOPSIS
aida2flat [options] aidafile [aidafile2 ...]
DESCRIPTION
Convert AIDA data files to a flat format which is more human-readable then the XML (and by default also plottable directly using
make-plots). The output is by default written out to standard output unless the --split, --smart-output, --gnuplot, or --output options are
specified. When specifying either input or output filenames, a '-' is used to refer to stdin or stdout as appropriate.
Histograms can also be filtered by AIDA path, using the -m or -M options for a positive or negative regex pattern patch respectively.
OPTIONS -h, --help
show this help message and exit
-o OUTPUT, --output=OUTPUT
Write all histos to a single output file, rather than the default writing to stdout. stdout can be explicitly specified by setting
'-' as the output filename. This option will be disregarded if --split, --smart-output, or --gnuplot is specified.
-s, --split
Write each histo to a separate output file, with names based on the histo path
-S, --smart-output
Write to output files with names based on the corresponding input filename. This option will be disregarded if --split is specified.
-g, --gnuplot
Provide output suitable for Gnuplot's 'plot "foo.dat" with xye'. This option implies --split and will override --output or
--smart-output
--plotinfodir=PLOTINFODIR
directory which may contain plot header information
-m PATHPATTERNS, --match=PATHPATTERNS
Only write out histograms whose $path/$name string matches these regexes
-M PATHUNPATTERNS, --unmatch=PATHUNPATTERNS
Exclude histograms whose $path/$name string matches these regexes
AUTHOR
This manual page was written by Lifeng Sun <lifongsun@gmail.com> for the Debian system (but may be used by others).
Rivet June 2012 AIDA2FLAT(1)