Re: Dumb little utilities

2002-09-04 Thread Clint Adams
 rename 's/\.c$/.x/' cumbersome?

Come on.  s///? Backslash? $? Not one, but two single quotes?
One may as well type for i in *.c ; mv $i ${i/.c(#e)/.x} or
for i (*.c) { mv $i ${i%c}x }
I really would rather type ren *.c *.x.  But then, I don't think in
perl.




Re: Dumb little utilities

2002-09-04 Thread J. Scott Edwards

On 3 Sep 2002, Goswin Brederlow wrote:

 J. Scott Edwards [EMAIL PROTECTED] writes:

  On Wed Aug 28 11:37:29 2002 Allan Wind wrote:
   On 2002-08-27 21:59:28, J. Scott Edwards wrote:
file slicer (that can slice up a file into different size chunks).
  
   dd?
 
  Yea, that would do it, slightly more cumbersome to use.

 split ?


split is cool, but I thought it would only divide the file up into the
same size pieces.  So you would have to run it several times.

-Scott





Re: Dumb little utilities

2002-09-04 Thread Marcus Brinkmann
On Wed, Aug 28, 2002 at 08:19:54AM +0200, Ola Lundqvist wrote:
  little endian hex dump
 May be interesting.

Should be an option to od, really.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' GNU  http://www.gnu.org[EMAIL PROTECTED]
Marcus Brinkmann  The Hurd http://www.gnu.org/software/hurd/
[EMAIL PROTECTED]
http://www.marcus-brinkmann.de/




Re: Dumb little utilities

2002-09-04 Thread J. Scott Edwards

On Tue, 3 Sep 2002, Malcolm Parsons wrote:

 On Tue, Sep 03, 2002 at 01:07:28PM -0600, J. Scott Edwards wrote:
 
  On Wed, 28 Aug 2002 Marcelo E. Magallon wrote:
 
  
Ola Lundqvist [EMAIL PROTECTED] writes:
  
  tab and untab (I just discovered that this can be done with pr).
 If it can be done with something else it might not be too necessary. It
 is your choice though.
  
JFYI, it can also be done with expand.
  
 
  One down.  Is there a program to do the reverse and convert the spaces to
  tabs?

 unexpand.


Two down :)





Re: Dumb little utilities

2002-09-04 Thread J. Scott Edwards

I had no idea all of these existed (I have heard of zsh).  Is there anyway
of finding these things out?  Apropos won't work if you don't have them
installed?

Thanks
  -Scott


On Tue, 3 Sep 2002, Clint Adams wrote:

 And if you use zsh, you don't need to bother with mmv or rename, since
 there's zmv.

   Anyway, it's similar to the 'rename' command that someone else mentioned.
   It renames multiple files like converting all the files in a directory
   from upper to lower case
 
mmv \* \#l1

 zmv '(*)' '${(L)1}'

   or changing the extension of the *.c files to *.x.
 
mmv \*.c \#1.x

 zmv '(*).c' '$1.x'

 or

 zmv -W '*.c' '*.x'

 or

 alias ren='noglob zmv -W'
 ren *.c *.x


 I find the last preferable to the more cumbersome syntaxes of rename and
 mmv.


 --
 To UNSUBSCRIBE, email to [EMAIL PROTECTED]
 with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]






Re: Dumb little utilities

2002-09-03 Thread J. Scott Edwards

On Wed Aug 28 11:37:29 2002 Allan Wind wrote:


 On 2002-08-27 21:59:28, J. Scott Edwards wrote:
  tab and untab (I just discovered that this can be done with pr).

 tr

I'm not the brightest bulb in the box, so perhaps it's just me, but tr
seems kind of a complicated way to do this.  I don't even see how to use
it for that.  If I wanted to change all of the files that I have that
are tabbed for 8 stops and change them to 3, to me it seems easier to just
do:

untab -t 8 *.e
tab -t 3 *.e


  file renamer (that can change case).

 rename

Yup that would do it (it would be nicer if it could do the directories
recursively).

  file slicer (that can slice up a file into different size chunks).

 dd?

Yea, that would do it, slightly more cumbersome to use.


  convert wave -- raw audio files

 sox



I will take a look at that.

Thanks
  -Scott






Re: Dumb little utilities

2002-09-03 Thread J. Scott Edwards


On Wed, 28 Aug 2002 Marcelo E. Magallon wrote:


  Ola Lundqvist [EMAIL PROTECTED] writes:

tab and untab (I just discovered that this can be done with pr).
   If it can be done with something else it might not be too necessary. It
   is your choice though.

  JFYI, it can also be done with expand.


One down.  Is there a program to do the reverse and convert the spaces to
tabs?

-Scott





Re: Dumb little utilities

2002-09-03 Thread J. Scott Edwards

On Wed, 28 Aug 2002 Romain Lerallut wrote:

 Thus spake J. Scott Edwards on Tue, Aug 27, 2002 at 09:59:28PM -0600:
  file renamer (that can change case).

 Just asking: anything that mmv can't do ?


(I guess that you meant 'mv'?)

Anyway, it's similar to the 'rename' command that someone else mentioned.
It renames multiple files like converting all the files in a directory
from upper to lower case or changing the extension of the *.c files to
*.x.

-Scott





Re: Dumb little utilities

2002-09-03 Thread Colin Watson
On Tue, Sep 03, 2002 at 01:02:20PM -0600, J. Scott Edwards wrote:
 On Wed, 28 Aug 2002 Romain Lerallut wrote:
  Thus spake J. Scott Edwards on Tue, Aug 27, 2002 at 09:59:28PM -0600:
   file renamer (that can change case).
 
  Just asking: anything that mmv can't do ?
 
 (I guess that you meant 'mv'?)

There really is something called 'mmv'. Check the package by the same
name.

For example:

 Anyway, it's similar to the 'rename' command that someone else mentioned.
 It renames multiple files like converting all the files in a directory
 from upper to lower case

  mmv \* \#l1

 or changing the extension of the *.c files to *.x.

  mmv \*.c \#1.x

The ';' character on the left-hand side can be used to recurse through
subdirectories.

-- 
Colin Watson  [EMAIL PROTECTED]




Re: Dumb little utilities

2002-09-03 Thread J. Scott Edwards

On Tue, 3 Sep 2002, I wrote:


 On Wed, 28 Aug 2002 Romain Lerallut wrote:
 
  Thus spake J. Scott Edwards on Tue, Aug 27, 2002 at 09:59:28PM -0600:
   file renamer (that can change case).
 
  Just asking: anything that mmv can't do ?
 

 (I guess that you meant 'mv'?)



I feel appropriately stupid now.  I checked on my machine and there was no
mmv so I thought perhaps it was just a typo.  But I just installed 'mmv'
and you're right it sounds similar all right.  I haven't quite figured mmv
out yet so I can't say if it's the same thing or not.

Sorry,
  -Scott






Re: Dumb little utilities

2002-09-03 Thread Goswin Brederlow
J. Scott Edwards [EMAIL PROTECTED] writes:

 On Wed Aug 28 11:37:29 2002 Allan Wind wrote:
  On 2002-08-27 21:59:28, J. Scott Edwards wrote:
   file slicer (that can slice up a file into different size chunks).
 
  dd?
 
 Yea, that would do it, slightly more cumbersome to use.

split ?

MfG
Goswin




Re: Dumb little utilities

2002-09-03 Thread Malcolm Parsons
On Tue, Sep 03, 2002 at 01:07:28PM -0600, J. Scott Edwards wrote:
 
 On Wed, 28 Aug 2002 Marcelo E. Magallon wrote:
 
 
   Ola Lundqvist [EMAIL PROTECTED] writes:
 
 tab and untab (I just discovered that this can be done with pr).
If it can be done with something else it might not be too necessary. It
is your choice though.
 
   JFYI, it can also be done with expand.
 
 
 One down.  Is there a program to do the reverse and convert the spaces to
 tabs?

unexpand.




Re: Dumb little utilities

2002-09-03 Thread Clint Adams
And if you use zsh, you don't need to bother with mmv or rename, since
there's zmv.

  Anyway, it's similar to the 'rename' command that someone else mentioned.
  It renames multiple files like converting all the files in a directory
  from upper to lower case
 
   mmv \* \#l1

zmv '(*)' '${(L)1}' 

  or changing the extension of the *.c files to *.x.
 
   mmv \*.c \#1.x

zmv '(*).c' '$1.x'

or

zmv -W '*.c' '*.x'

or

alias ren='noglob zmv -W'
ren *.c *.x


I find the last preferable to the more cumbersome syntaxes of rename and
mmv.




Re: Dumb little utilities

2002-09-03 Thread Joey Hess
Clint Adams wrote:
 alias ren='noglob zmv -W'
 ren *.c *.x

Ok, I love zsh and all, but: RUN AWAY!!

 I find the last preferable to the more cumbersome syntaxes of rename and
 mmv.

rename 's/\.c$/.x/' cumbersome?

-- 
see shy jo, suffering 4dos flashbacks (see my .zshrc)


pgpl43ZOy1ZMN.pgp
Description: PGP signature


Re: Dumb little utilities

2002-08-28 Thread Ola Lundqvist
On Tue, Aug 27, 2002 at 09:59:28PM -0600, J. Scott Edwards wrote:
 
 I guess I was worried that they are so trivial that any of the real
 programmers on this list could recreate them in 5 minutes with sed, awk,
 and perl. :)
 
 But, well ok:
 
 little endian hex dump
May be interesting.

 tab and untab (I just discovered that this can be done with pr).
If it can be done with something else it might not be too necessary. It
is your choice though. 

 find a file within a file
 duplicate file remover
 file renamer (that can change case).
 file slicer (that can slice up a file into different size chunks).
These tools can be really nice, especially in a nice package. :)

 display id3 tags in mp3 files
 remove id3 tags in mp3 files
 generate id3 tags from file name (probably not generally useful).
Could be packaged together. If there are plenty of those already packaged
it might not be necessary though.

 convert wave -- raw audio files
 examine wave/raw audio files and print stats
 change amplitude of wave/raw audio files
 adjust lead in/lead out of wave/raw audio files
Could be packaged together too.

 
 There's a few others, but that is the general idea...

Regards,

// Ola

 -Scott
 
 
 On 27 Aug 2002, Oliver Elphick wrote:
 
  On Tue, 2002-08-27 at 17:11, J. Scott Edwards wrote:
  
   Hello,
  
   I have a compiler (based upon SmallEiffel) and a bunch of dumb little
   utilites that I have been planning to make .deb files for.  But I don't
   know if they have enough general appeal to make them official, or if I
   should just make them and put them on my SourceForge project pages.  Does
   anybody have any recommendations?
 
  Should you not describe them.  You haven't given much detail here, you
  know...
 
  --
  Oliver Elphick[EMAIL PROTECTED]
  Isle of Wight, UK
  http://www.lfix.co.uk/oliver
  GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
   
   But the end of all things is at hand; be ye therefore
sober, and watch unto prayer. And above all things
have fervent love among yourselves; for love shall
cover the multitude of sins.  I Peter 4:7,8
 
 
 
 
 -- 
 To UNSUBSCRIBE, email to [EMAIL PROTECTED]
 with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
 

-- 
 - Ola Lundqvist ---
/  [EMAIL PROTECTED] Björnkärrsgatan 5 A.11   \
|  [EMAIL PROTECTED] 584 36 LINKÖPING |
|  +46 (0)13-17 69 83  +46 (0)70-332 1551   |
|  http://www.opal.dhs.org UIN/icq: 4912500 |
\  gpg/f.p.: 7090 A92B 18FE 7994 0C36  4FE4 18A1 B1CF 0FE5 3DD9 /
 ---




Re: Dumb little utilities

2002-08-28 Thread Tollef Fog Heen
* J. Scott Edwards 

| file renamer (that can change case).

what's wrong with rename(1)?

-- 
Tollef Fog Heen,''`.
UNIX is user friendly, it's just picky about who its friends are  : :' :
  `. `' 
`-  




Re: Dumb little utilities

2002-08-28 Thread Romain Lerallut
Thus spake J. Scott Edwards on Tue, Aug 27, 2002 at 09:59:28PM -0600:
 file renamer (that can change case).

Just asking: anything that mmv can't do ?

regards,
Romain




Re: Dumb little utilities

2002-08-28 Thread Marcelo E. Magallon
 Ola Lundqvist [EMAIL PROTECTED] writes:

   tab and untab (I just discovered that this can be done with pr).
  If it can be done with something else it might not be too necessary. It
  is your choice though. 

 JFYI, it can also be done with expand.

-- 
Marcelo | This signature was automatically generated with
[EMAIL PROTECTED] | Signify v1.07.  For this and other cool products,
| check out http://www.debian.org/




Re: Dumb little utilities

2002-08-28 Thread Peter De Wachter
On Tue, Aug 27, 2002 at 09:59:28PM -0600, J. Scott Edwards wrote:
 convert wave -- raw audio files
 examine wave/raw audio files and print stats
 change amplitude of wave/raw audio files
 adjust lead in/lead out of wave/raw audio files

Have you looked at sox? It does these things and a lot more, but most
people only know the play command :)


Peter De Wachter




Re: Dumb little utilities

2002-08-28 Thread Oohara Yuuma
On Tue, 27 Aug 2002 21:59:28 -0600 (MDT),
J. Scott Edwards [EMAIL PROTECTED] wrote:
 little endian hex dump
Can this tackle the length of int?

 find a file within a file
Can you elaborate?  Is it something like tar -x or munpack?

 duplicate file remover
interesting

 file renamer (that can change case).
rename (in perl) or mmv

 file slicer (that can slice up a file into different size chunks).
split(1)

 display id3 tags in mp3 files
 remove id3 tags in mp3 files
mp3info (I think there are other tools)

 generate id3 tags from file name (probably not generally useful).
It may save some perl one-liner.

 convert wave -- raw audio files
 examine wave/raw audio files and print stats
 change amplitude of wave/raw audio files
 adjust lead in/lead out of wave/raw audio files
sox

I don't like the people who always say why do you bloat Debian
with yet another foo every time they see an ITP, but you should
write the description carefully so that the user can see
the difference.  Study what is already packaged.

-- 
Oohara Yuuma [EMAIL PROTECTED]
Debian developer
PGP key (key ID F464A695) http://www.interq.or.jp/libra/oohara/pub-key.txt
Key fingerprint = 6142 8D07 9C5B 159B C170  1F4A 40D6 F42E F464 A695

I played almost all shoot-en-up games in Debian before I wrote tenmado.




Re: Dumb little utilities

2002-08-28 Thread Andreas Rottmann
Ola Lundqvist [EMAIL PROTECTED] writes:

  convert wave -- raw audio files
  examine wave/raw audio files and print stats
  change amplitude of wave/raw audio files
  adjust lead in/lead out of wave/raw audio files
 Could be packaged together too.
 
Have a look at sox - do your programs have any extra features?

Regards, Andy
-- 
Andreas Rottmann | [EMAIL PROTECTED]| [EMAIL PROTECTED] | 
[EMAIL PROTECTED]
http://www.8ung.at/rotty | GnuPG Key: http://www.8ung.at/rotty/gpg.asc
Fingerprint  | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62




Re: Dumb little utilities

2002-08-28 Thread Mark Ferlatte
begin  Oohara Yuuma quote on Wed, Aug 28, 2002 at 11:57:31PM +0900:
  generate id3 tags from file name (probably not generally useful).
 It may save some perl one-liner.

id3ren does this.

M



pgp7m14E3fGi3.pgp
Description: PGP signature


Re: Dumb little utilities

2002-08-27 Thread Oliver Elphick
On Tue, 2002-08-27 at 17:11, J. Scott Edwards wrote:
 
 Hello,
 
 I have a compiler (based upon SmallEiffel) and a bunch of dumb little
 utilites that I have been planning to make .deb files for.  But I don't
 know if they have enough general appeal to make them official, or if I
 should just make them and put them on my SourceForge project pages.  Does
 anybody have any recommendations?

Should you not describe them.  You haven't given much detail here, you
know...

-- 
Oliver Elphick[EMAIL PROTECTED]
Isle of Wight, UK
http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
 
 But the end of all things is at hand; be ye therefore 
  sober, and watch unto prayer. And above all things 
  have fervent love among yourselves; for love shall  
  cover the multitude of sins.  I Peter 4:7,8




Re: Dumb little utilities

2002-08-27 Thread J. Scott Edwards

I guess I was worried that they are so trivial that any of the real
programmers on this list could recreate them in 5 minutes with sed, awk,
and perl. :)

But, well ok:

little endian hex dump
find a file within a file
duplicate file remover
tab and untab (I just discovered that this can be done with pr).
file renamer (that can change case).
file slicer (that can slice up a file into different size chunks).

display id3 tags in mp3 files
remove id3 tags in mp3 files
generate id3 tags from file name (probably not generally useful).
convert wave -- raw audio files
examine wave/raw audio files and print stats
change amplitude of wave/raw audio files
adjust lead in/lead out of wave/raw audio files

There's a few others, but that is the general idea...

-Scott


On 27 Aug 2002, Oliver Elphick wrote:

 On Tue, 2002-08-27 at 17:11, J. Scott Edwards wrote:
 
  Hello,
 
  I have a compiler (based upon SmallEiffel) and a bunch of dumb little
  utilites that I have been planning to make .deb files for.  But I don't
  know if they have enough general appeal to make them official, or if I
  should just make them and put them on my SourceForge project pages.  Does
  anybody have any recommendations?

 Should you not describe them.  You haven't given much detail here, you
 know...

 --
 Oliver Elphick[EMAIL PROTECTED]
 Isle of Wight, UK
 http://www.lfix.co.uk/oliver
 GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
  
  But the end of all things is at hand; be ye therefore
   sober, and watch unto prayer. And above all things
   have fervent love among yourselves; for love shall
   cover the multitude of sins.  I Peter 4:7,8