[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sas-l
Subject:    Unix: (was: Help a SAS user on UNIX Looking...)
From:       "Karsten M. Self" <kmself () IX ! NETCOM ! COM>
Date:       1999-06-30 21:26:28
[Download RAW message or body]

> Date:    Wed, 30 Jun 1999 12:09:03 +0200
> From:    "LANOUE, Jaques" <Jaques.LANOUE@RP-RORER.FR>
> Subject: Help a SAS user on UNIX Looking for an active Unix List group
>
> Sorry to bother you with this but i need some help on Unix available tools.
>
> Ex.:
>  pgm to do a find/replace on many files at a time.

You can try looking under news:comp.os.solaris.*, news:comp.unix.*, or
news:comp.os.linux.* for general Unix information.

To run one or more unix commands on a list of arguments, use a list.  A
list can be a number of constant arguments, a wildcard expression which
expands to a list (eg:  *.sas), or program output.  Following assumes a
Bourne-derived shell (Bourne, korn, Posix, or bash shells -- csh and
tcsh syntax will differ).

$ for $file in  *.sas
do
    sed -e'/unix rocks/s//linux rocks/' < $file > $file.new
done

You could replace the first line with any of the following:

# Listed files
$ for file in my.sas your.sas his.sas

# Program output
$ for file in `find . -name \*.sas -print`


I'd recommend purchasing one or more of the following:

"UNIX in a Nutshell", O'Reilly & Associates
(http://www.oreilly.com/catalog/unutv/noframes.html)

"UNIX Power Tools", O'Reilly & Associates
(http://www.oreilly.com/catalog/upt2/)

"Learning the UNIX Operating System, 4th Edition"
(http://www.oreilly.com/catalog/lunix4/)

I have the first two books and prefer learning by example.  There are
additional texts, but the material becomes redundant after a point.
--
Karsten M. Self (kmself@ix.netcom.com)
    What part of "Gestalt" don't you understand?

SAS for Linux: http://www.netcom.com/~kmself/SAS/SAS4Linux.html
Mailing List:  body "subscribe sas-linux"
mailto:majordomo@Cranfield.ac.uk

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic