09-26-2011
List files according to the numerical value
Hi,
I have a large number of files which are named as follows.
VF_50, VF_100, VF_150, VF_250, VF_300, VF_350, VF_400, VF_450, VF_500.
When I do an 'ls' it arranges the files in the following way
VF_100, VF_150, VF_250, VF_300, VF_350, VF_400, VF_450, VF_50, VF_500.
Is there a way to arrange the files according to its numerical value, i.e. VF_50 has a lower numerical value than VF_100.
Thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, I'm trying to write a ksh script to copy a specified number of files from one directory to another.
The files are named in the convention <switchname>_log.<num> and the numbers are sequential single digit onwards. I figured I could find some parameter for ls which would list the files in... (3 Replies)
Discussion started by: Steve_H
3 Replies
2. Programming
Hi I was hoping that maybe someone could help me with a small piece of C code. I have a number of files, which are all of similar layout ie. three lines of text and 5-6 columns of numerical data. I need to add each of the elements of the second column in one file to their counterparts in the second... (17 Replies)
Discussion started by: Boucho
17 Replies
3. Shell Programming and Scripting
Hi everyone,
I would love to have a script that does the following:
I have one file that looks like that:
ATOM 1 BB SER 1 1 -31.958 -25.125 -11.061 1.00 0.00
ATOM 3 BB GLY 1 2 -32.079 -26.085 -14.466 1.00 0.00
ATOM 4 BB VAL 1 3 ... (1 Reply)
Discussion started by: s-layer
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have 500 directories each with multiple data files inside them. The names are sort of random. For example, one directory has files named e_1.dat, e_5.dat, e_8.dat, etc. I need to move the files to a single directory and rename them all in numerical order, from 1.dat to 1000(or some... (1 Reply)
Discussion started by: renthead720
1 Replies
5. UNIX for Dummies Questions & Answers
Hi
I am newbie to unix scripting, but i have enough knowledge to understand.
I have a specific questions like, I use to collect like 3500 files per experiment, each one named like
data_001.img..
data_002.img
data_003.img
....
data_3500.img
I would like to move every 12 files in the 3500... (3 Replies)
Discussion started by: wpat
3 Replies
6. UNIX for Dummies Questions & Answers
Hi, I have a series of files (upwards of 500) the filename format is as follows
CC10-1234P1999.WGS84.p190, all in one directory.
Now the last three numeric characters, in this case 999, can be anything from 001 to 999.
I need to move some of them to a seperate directory, the ones I need to... (5 Replies)
Discussion started by: roche.j.mike
5 Replies
7. Shell Programming and Scripting
Hello
I have a directory with a list of files which have a particular numerical suffix.
E.g
filename_0
filename_1
filename_18500
filename_10000
I want to delete all files from this directory which have a filename which have a numerical suffix greater than 10540.
So any files... (5 Replies)
Discussion started by: kamal_p_99
5 Replies
8. Shell Programming and Scripting
Hi experts,
I have a list of files containing forces as the only number as follows.
Force1.txt Force2.txt Force3.txt Force4.txt Force5.txt . . . . . . . . . Force100.txt I want to put all the data(only a number ) in these forces files in the file with the same order like 1,2,3 ..100 .... (2 Replies)
Discussion started by: hamnsan
2 Replies
9. Shell Programming and Scripting
Hello.
I have a long list of data which has the following structure
The number shows the unique identity of the word. And all homophones are clustered with the same number ID.
An example will make this clear
The awk script I have allows conversion of a list to row but on condition that each... (4 Replies)
Discussion started by: gimley
4 Replies
10. Shell Programming and Scripting
In the bash below the unique headers of each vcf.gz are stored in a text file with the same name. That is if 16-0000-file.vcf.gz was used the header text file would be 16-0000-file_header.txt.
There can be multiple vcf.gz in a directory, usually 3, that I need to fix the header in each file before... (6 Replies)
Discussion started by: cmccabe
6 Replies
lp(1) General Commands Manual lp(1)
Name
lp - send requests to an LP line printer
Syntax
lp [-c] [-d dest] [-n number] [-] [files]
Description
The command arranges for the named files and associated information (collectively called a request) to be printed by a line printer. If no
file names are mentioned, the standard input is assumed. When a file name is designated by a minus sign (-) it stands for the standard
input and may be supplied on the command line in conjunction with named files. The order in which files appear is the same order in which
they are printed.
This command exists for X/OPEN compatibility.
Options
The following options to may appear in any order and may be intermixed with file names:
-c Makes copies of the files to be printed immediately when is invoked. Normally, files are not copied, but are linked whenever
possible. If the -c option is not given, then the user should be careful not to remove any of the files before the request has
been printed in its entirety. It should also be noted that without the -c option, any changes made to the named files after
the request is made but before it is printed are reflected in the printed output.
-d dest Chooses dest as the printer that is to do the printing. If dest is a printer, then the request is printed on that specific
printer. By default, dest is taken from the environment variable PRINTER if it is set. Otherwise, a default destination, lp,
is used.
-n number Prints number copies (default of 1) of the output.
Files
/etc/passwd personal identification
/etc/printcap printer capabilities data base
/usr/lib/lpd* line printer daemons
/usr/spool/* directories used for spooling
/usr/spool/*/cf* daemon control files
/usr/spool/*/df* data files specified in cf files
/usr/spool/*/tf* temporary copies of cf files
See Also
lpq(1), lpr(1), lprm(1), pr(1), symlink(2), printcap(2), lpc(8), lpd(8)
lp(1)