Just a sample of the Echomail archive
Cooperative anarchy at its finest, still active today. Darkrealms is the Zone 1 Hub.
|    FIDOGAZETTE    |    FidoGazette: An Alternative Newsletter    |    8,941 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 6,373 of 8,941    |
|    mark lewis to Janis Kracht    |
|    FidoGazette Vol 13 no 26 Page: 2    |
|    27 Jun 19 00:00:30    |
   
   REPLY: 1:261/38.0 0fd039ff   
   MSGID: 1:3634/12.73 5d145119   
   PID: GED+LNX 1.1.5-b20180707   
   CHRS: CP437 2   
   TZUTC: -0400   
   TID: hpt/lnx 1.9.0-cur 07-09-15   
      
    On 2019 Jun 26 23:09:20, you wrote to All:   
      
    JK> ========Script: mvbad2tic==========   
    JK> #!/bin/sh   
    JK> list="`ls -1 *.bad`"   
    JK> for file in $list   
    JK> do   
    JK> f=`basename $file .bad`.tic   
    JK> mv $file $f   
    JK> done   
    JK> ===================================   
      
   that's pretty neat! another way it could be done is this oneliner...   
      
   ls -1 *.bad | \   
    tr '\n' '\0' | \   
    xargs -0 -n 1 -i basename "{}" .bad | \   
    tr '\n' '\0' | \   
    xargs -0 -n 1 -i echo mv "{}".bad "{}".tic   
      
   it seems convoluted but actually makes sense once you figure it out... plus it   
   handles files with spaces in their names...   
      
   1. list the *.bad files one per line   
   2. replace newlines with nuls   
   3. use xargs to feed each line to basename to strip leading path and trailing   
   .bad   
   4. replace newlines with nuls   
   5. use xargs to feed each line to mv (remove echo when you see it print the   
   commands as you expect)   
      
   we've been using this following one with various changes depending on the   
   extensions needed... it uses sed recipe for the change of extension and   
   handles files with spaces, too... you just have install rename...   
      
    rename 's/\.bad$/.pkt/' *.bad   
      
   it was very handy when first setting up the new system and traffic was already   
   flowing while we were still configuring the tosser which was renaming a lot of   
   pkts to bad because we were still looking up and configuring the packet   
   passwords :lol:   
      
   )\/(ark   
      
   Always Mount a Scratch Monkey   
   Do you manage your own servers? If you are not running an IDS/IPS yer doin' it   
   wrong...   
   ... "Who stole my thermal underwear?" the hunter asked coldly.   
   ---   
    * Origin: (1:3634/12.73)   
   SEEN-BY: 1/120 123 14/6 15/2 18/0 200 103/705 116/116 123/0 25 50   
   SEEN-BY: 123/115 120 150 755 135/300 153/7715 154/10 30 40 700 203/0   
   SEEN-BY: 221/0 6 226/17 227/114 201 400 229/200 354 426 1014 240/5832   
   SEEN-BY: 249/206 307 317 400 261/38 280/464 5003 5555 292/854 310/31   
   SEEN-BY: 317/3 322/757 340/800 342/200 393/68 396/45 423/120 633/280   
   SEEN-BY: 712/848 770/1 2452/250 3634/0 12 15 27 50 119 3828/7   
   PATH: 3634/12 154/10 280/464 229/426   
      
|
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca