07-31-2012
Change filename - increment digit by 60
I have a bunch of files, they have spaces! I am working in windows 7, but I am hoping I could install and use cygwin or some other unix platform to rename my files (suggestions welcome).
The files are named:
Wind Attn Vol - 474.wrl
Wind Attn Vol - 475.wrl
Wind Attn Vol - 476.wrl etc..
I want the digits to be incremented by 60
Wind Attn Vol - 534.wrl
Wind Attn Vol - 535.wrl
Wind Attn Vol - 536.wrl etc..
All suggestions are greatly appreciated.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I am newbie and hope that you can help me to rename a file
If I have a file name Perform.01222006.12345.Log now I would like to backup another file with another name like perform-20060112.dat
This is a flat file, and I want to collect some field, then put it in a new file from... (9 Replies)
Discussion started by: sabercats
9 Replies
2. Shell Programming and Scripting
Folks,
Is there a simple way to replace one digit by two digit using sed.
Example,
mydigit1918_2006_8_8_lag1.csv should be
mydigit1918_2006_08_08_lag01.csv.
I tried this way, but doesn't work.
echo mydigit1989_2006_8_8_lag1.csv|sed 's/]/0]/'
Thank you, (5 Replies)
Discussion started by: Jae
5 Replies
3. Shell Programming and Scripting
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
4. UNIX for Dummies Questions & Answers
Hi guys,
Can someone help me out with this:
I have a directory with files like the following,
GHost++ 2010-03-14 04-01 DotaCash RD us_ca LC #7 (44m19s).w3g
GHost++ 2010-03-14 04-06 DotaCash AP us_ca LC #8 (42m24s).w3g
GHost++ 2010-03-14 04-07 DotaCash AR us_ca LC #10 (08m23s).w3g ... (4 Replies)
Discussion started by: hbjlee17
4 Replies
5. Shell Programming and Scripting
I have 100 files in a directory with
a.1
a.2
a.3
a.4
How do i remove a. and i need the file names as
1
2
3
4
please help (2 Replies)
Discussion started by: srichunduru
2 Replies
6. Shell Programming and Scripting
Have columns with digits and strings like:
input.txt
3840 3841 3842 Dav Thun Tax
Cahn 146; Dav.
3855 3853 3861 3862 Dav Thun Tax
2780 Karl VI.,
3873 3872 3872 Dav Thun Tax
3894 3893 3897 3899 Dav Thun Tax
403; Thun 282.
3958 3959 3960 Dav Thun Tax
3972 3972 3972 3975 Dav Thun Tax... (8 Replies)
Discussion started by: sdf
8 Replies
7. Shell Programming and Scripting
Hi guys,
I have a variable where i am storing the filename (with full path).
I just need the value before ".txt". But instead of getting the filename i am getting the contents of the filename.
FileName=/appl/data/Input/US/Test.txt
a=`awk -F"." '{print $1}' ${FileName}`
echo $a... (3 Replies)
Discussion started by: mac4rfree
3 Replies
8. Shell Programming and Scripting
Hi,
I would like to add a suffix to a file name but maintain the suffix length to 5 digits.
For eg,
output > 1st_file.00001, 2nd_file.00002...10th_file.00010....100th_file.00100
Can anyone please advise me on how to go about it?
Platform: SunOS mps201a 5.9 Generic_118558-39 sun4u... (7 Replies)
Discussion started by: danish0909
7 Replies
9. Shell Programming and Scripting
Hi Guys.
My Input:
ABCD 12 00 KL
ABCD 12 08 DL
ABCD 12 10 KK
ABCD 12 04 LL
ABCD 13 00 LP
ABCD 13 1O LS
Output:
ABCD 12 0 KL
ABCD 12 8 DL
ABCD 12 10 KK
ABCD 12 4 LL
ABCD 13 0 LP (2 Replies)
Discussion started by: pareshkp
2 Replies
10. UNIX for Dummies Questions & Answers
Hi
i want to list files based on date and change the date alone in the files in a directory
abc20120101.txt
xyzxyxz20120101.txt
ccc20120201.txt
ddd20120301.txt
In the above i want to select only files having date 20120101 and rename the date for those files like below
abc20111231.txt... (3 Replies)
Discussion started by: Dewdrop
3 Replies
LEARN ABOUT NETBSD
sradixsort
RADIXSORT(3) BSD Library Functions Manual RADIXSORT(3)
NAME
radixsort, sradixsort -- radix sort
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <limits.h>
#include <stdlib.h>
int
radixsort(const u_char **base, int nmemb, u_char *table, u_int endbyte);
int
sradixsort(const u_char **base, int nmemb, u_char *table, u_int endbyte);
DESCRIPTION
The radixsort() and sradixsort() functions are implementations of radix sort.
These functions sort an nmemb element array of pointers to byte strings, with the initial member of which is referenced by base. The byte
strings may contain any values. End of strings is denoted by character which has same weight as user specified value endbyte. endbyte has
to be between 0 and 255.
Applications may specify a sort order by providing the table argument. If non-NULL, table must reference an array of UCHAR_MAX + 1 bytes
which contains the sort weight of each possible byte value. The end-of-string byte must have a sort weight of 0 or 255 (for sorting in
reverse order). More than one byte may have the same sort weight. The table argument is useful for applications which wish to sort differ-
ent characters equally, for example, providing a table with the same weights for A-Z as for a-z will result in a case-insensitive sort. If
table is NULL, the contents of the array are sorted in ascending order according to the ASCII order of the byte strings they reference and
endbyte has a sorting weight of 0.
The sradixsort() function is stable, that is, if two elements compare as equal, their order in the sorted array is unchanged. The
sradixsort() function uses additional memory sufficient to hold nmemb pointers.
The radixsort() function is not stable, but uses no additional memory.
These functions are variants of most-significant-byte radix sorting; in particular, see D.E. Knuth's Algorithm R and section 5.2.5, exercise
10. They take linear time relative to the number of bytes in the strings.
RETURN VALUES
Upon successful completion 0 is returned. Otherwise, -1 is returned and the global variable errno is set to indicate the error.
ERRORS
[EINVAL] The value of the endbyte element of table is not 0 or 255.
Additionally, the sradixsort() function may fail and set errno for any of the errors specified for the library routine malloc(3).
SEE ALSO
sort(1), qsort(3)
Knuth, D.E., "Sorting and Searching", The Art of Computer Programming, Vol. 3, pp. 170-178, 1968.
Paige, R., "Three Partition Refinement Algorithms", SIAM J. Comput., No. 6, Vol. 16, 1987.
McIlroy, P., "Computing Systems", Engineering Radix Sort, Vol. 6:1, pp. 5-27, 1993.
HISTORY
The radixsort() function first appeared in 4.4BSD.
BSD
January 27, 1994 BSD