Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Output all files fitting the pattern Post 302677675 by FUTURE_EINSTEIN on Thursday 26th of July 2012 01:44:39 PM
Old 07-26-2012
Output all files fitting the pattern

Hi there I need to create 1 line pipe that outputs list of files whose second character is digit in reverse order (file is a directory and called /tmp)the way I did
ls /tmp | grep '^.[[:digit:]]*' | sort -r
dunno it does not seem working. I tried to do it with another directory that I am sure contain a file fitting this BRE but it does not work.
So I have 2 question why it does not work (because file is a directory or perhaps because my pattern is written not correctly) and how should I do it ??? Thanks in advance!!! SmilieSmilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pattern searching pattern in c files

I have a problem in searching a specific pattern in c files. My requirement: I have to find all the division operator in all cfiles. The problem is, the multi line comments and single line comments will also have forward slash in it. Even after avoiding these comments also, if both... (6 Replies)
Discussion started by: murthybptl
6 Replies

2. UNIX for Dummies Questions & Answers

copying a pattern of files in one directory into other with new pattern names...

Hi, I have to copy a set of files abc* in /path/ to /path1/ as abc*_bkp. The list of files appear as follows in /path/: abc1 xyszd abc2 re2345 abcx .. . abcxyz I have to copy them (abc* files only) into /path1/ as: abc1_bkp abc2_bkp abcx_bkp .. . (6 Replies)
Discussion started by: new_learner
6 Replies

3. UNIX for Dummies Questions & Answers

Fitting data in gnuplot with xyerrorbars

I was looking at the examples that show how to fit data using gnuplot (ex: gnuplot / misc (2E)) but I can't find a place that shows what to do if I have ranges for the x and y error bars. I tried the common sense: gnuplot> fit f(x) "data.txt" using 3:6:4:5:7:8 via a,b ... (8 Replies)
Discussion started by: cosmologist
8 Replies

4. UNIX for Dummies Questions & Answers

Gnuplot - Histogram Fitting

Hi I am trying to fit my histogram data with a gaussian model and am encountering two problems: 1. I can't seem to fit the histogram data with a model fit y(x) 'bin.txt' using 2:xtic(1) via a,b,c (error: need 2 to 7 using specs) 2. Even when I manually guess the correct parameters for my fit and... (1 Reply)
Discussion started by: goffinj
1 Replies

5. Shell Programming and Scripting

Find required files by pattern in xml files and the change the pattern on Linux

Hello, I need to find all *.xml files that matched by pattern on Linux. I need to have written the file name on the screen and then change the pattern in the file just was found. For instance. I can start the script with arguments for keyword and for value, i.e script.sh keyword... (1 Reply)
Discussion started by: yart
1 Replies

6. UNIX for Dummies Questions & Answers

Fitting a range of data

Hi, I am able to write an awk program that fits using the chi squared minimization method for each number is a data column... but I am wondering if it is possible to do that for a range of numbers at the same time. If I have a column for the observed data... and then say 10 columns for... (13 Replies)
Discussion started by: cosmologist
13 Replies

7. Shell Programming and Scripting

Displaying log file pattern output in tabular form output

Hi All, I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form 1). Intercomponents Checking Passed: All Server are passed. ====================================================================== 2). OS version Checking... (9 Replies)
Discussion started by: Optimus81
9 Replies

8. UNIX Desktop Questions & Answers

How to add certain pattern to an output..?

Hi Everyone If i do this cat /usr/local/data/sales/taxware/indata/stepprod |wc -l i'll get output like this 5 And now i want to add a word for this output 'stepprod' (no quotes, only word) like below stepprod 5 Thank you (7 Replies)
Discussion started by: Ramanareddygv
7 Replies

9. Shell Programming and Scripting

Pattern output

Hi All, Seeking for your assistance on how to get the two pattern below. Example file1.txt GET /Sun/Cellular/version1/12 HTTP/1.0 100 Internal Error GET /Sun/Cellular/version1 GET /Sun/Cellular/version1 GET /Sun/Cellular/version1 GET /Sun/Cellular/version1/13 HTTP/1.0 100 Internal... (10 Replies)
Discussion started by: znesotomayor
10 Replies

10. Shell Programming and Scripting

How to use awk to output such a pattern?

Hi all, I want to output the following pattern in a comma separted format, but am not able to do it. Table1.FIND.Value= 124 Data Data Data Data Data Table1.FIND.Value =256 Data Data Data Data Data The outPut i expect is (5 Replies)
Discussion started by: sidnow
5 Replies
updatedb.conf(5)						File Formats Manual						  updatedb.conf(5)

NAME
/etc/updatedb.conf - a configuration file for updatedb(8) DESCRIPTION
/etc/updatedb.conf is a text file. Blank lines are ignored. A # character outside of a quoted string starts a comment extending until end of line. Other lines must be of the following form: VARIABLE = "VALUE" White space between tokens is ignored. VARIABLE is an alphanumeric string which does not start with a digit. VALUE can contain any char- acter except for ". No escape mechanism is supported within VALUE and there is no way to write VALUE spanning more than one line. Unknown VARIABLE values are considered an error. The defined variables are: PRUNEFS A whitespace-separated list of file system types (as used in /etc/mtab) which should not be scanned by updatedb(8). The file system type matching is case-insensitive. By default, no file system types are skipped. When scanning a file system is skipped, all file systems mounted in the subtree are skipped too, even if their type does not match any entry in PRUNEFS. PRUNENAMES A whitespace-separated list of directory names (without paths) which should not be scanned by updatedb(8). By default, no directory names are skipped. Note that only directories can be specified, and no pattern mechanism (e.g. globbing) is used. PRUNEPATHS A whitespace-separated list of path names of directories which should not be scanned by updatedb(8). Each path name must be exactly in the form in which the directory would be reported by locate(1). By default, no paths are skipped. PRUNE_BIND_MOUNTS One of the strings 0, no, 1 or yes. If PRUNE_BIND_MOUNTS is 1 or yes, bind mounts are not scanned by updatedb(8). All file systems mounted in the subtree of a bind mount are skipped as well, even if they are not bind mounts. As an exception, bind mounts of a directory on itself are not skipped. By default, bind mounts are not skipped. NOTES
When a directory is matched by PRUNEFS, PRUNENAMES or PRUNEPATHS, updatedb(8) does not scan the contents of the directory. The path of the directory itself is, however, entered in the created database. For example, if /tmp is in PRUNEPATHS, locate(1) will not show any files stored in /tmp, but it can show the /tmp directory. This behavior differs from traditional locate implementations. In some updatedb(8) implementations PRUNEPATHS can be used to exclude non-directory files. This is not the case in this implementation. /etc/updatedb.conf is a shell script in some implementations, which allows much more flexibility in defining the variables. Equivalent functionality can be achieved by using the command-line options to updatedb(8). AUTHOR
Miloslav Trmac <mitr@redhat.com> SEE ALSO
locate(1), updatedb(8) mlocate Jun 2008 updatedb.conf(5)
All times are GMT -4. The time now is 09:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy