gwen (gwenix) wrote,
gwen
gwenix

  • Mood:
ok, i feel like i've just taken another step into unix guru. i
just did:

root@qs377# foreach i ( `ls ????{092[3-9],0930,1001}*` )
foreach? ./logs `echo $i | sed s/\.logs//`
foreach? end

yes, i know it'd have been geekier to do the foreach on the same
line, but i like seeing it spread out. generally i'm doing more
than one line of commands at a time, and my shell allows me to
backscroll and edit the whole loop, so one line is unnecessary.

this disclaimer is to pre-empt athanasius and rapier1, :)
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments