The OP wanted a simple list of files, not the long listing format of ls output. I didn't see any indication that the OP wanted the files sorted in reverse order by timestamp instead of by filename. And, since the desired filenames all start with "P", there's no need for ls's -a option.
The OP wanted filenames containing the numbers 61649 through 61979 inclusive, the pattern in the grep above will exclude several desired files from the output including (but not limited to) 61900-61949 and 61680-61699.
If the OP's shell doesn't support sequence expansions like {61649..61979}, or if the expansion of PROFILE_TXN_{61649..61979}.dat on the ls command causes its invocation to fail because ARG_MAX was exceeded, I believe the following ls and grep combination will work:
When I use this command I get an output of some numbers
cat ac.20070511 | cut -d" " -f19
Is there any way for me to display only the numbers that are greater than 1000 but not all the numbers in the ouput.
Can any one help me with this. :) (8 Replies)
Hi,
I am new to Unix and was trying different ways of how to display the list of file names modified between a given date range in sorting order.I will get the fromdate and Todate from the browser, I need to display the list of all the file names that are modified between the given date... (1 Reply)
Hi All,
I want a shell script which can display the file with in the date range.
For Example I have 15 files with the following format
abc_01-01-2009.txt to abc_15-01-2009.txt.
Now I want to have the files between 4th of jan to 12th files.
How can I acheive this.
Advance... (1 Reply)
Hi All,
I have a requirement to display all the dates within the provided (through user input) date range.
For eg: If I enter 28012009 (as From date in the format 'DDMMYYYY') and 02022009(as To date in the format 'DDMMYYYY'), the output should be all dates occuring between the from and to... (11 Replies)
I have a data in a file called SCHED which has 5 columns: sched no, date, time, place and remarks. The image is shown below.
http://dl.dropbox.com/u/54949888/Screenshot%20from%202013-01-02%2002%3A42%3A25.png
Now, I want to display only the schedules which fall under a certain date range which... (2 Replies)
I have a list of columns with values that I need to transform into a row containing the range of each column. For example:
"Column A"
1
2
3
4
10
12
14
15
16
17
18
"Column B"
1
4
5
6 (4 Replies)
Gents,
It is possible to generate a range of values according to column 1 and count the total of rows in the range.
example
input
15.3
15.5
15.8
15.9
16.0
16.1
16.8
17.0
17.5
18.0
output desired
15.0 - 15.9 = 4 (10 Replies)
My script reads all the log files in a directory, the user would enter a range and the script would only display the files within those range. Here's my code:
#!/bin/bash
LOG_FILES=("Sandbox/logs/*")
for file in ${LOG_FILES}; do echo $file; done
-------------
for i in $(seq $1 $2); do... (1 Reply)