How to do <cmd> file | hold file (now cp)

BURNS gt0178a at prism.gatech.EDU
Thu Sep 13 17:25:31 AEST 1990


in article <13611 at hydra.gatech.EDU>, gt0178a at prism.gatech.EDU (BURNS,JIM) says:
[version 1 of script]

And more to Leslie's point, by adding the chmod, its clear that neither cp
or > change the attributes of the destination file:

+ touch s
+ chmod 700 s
+ ll -i s usage.new
123973 -rwx------  1 gt0178a         0 Sep 13 03:23 s*
123822 -rw-r--r--  1 gt0178a      1280 Sep 13 02:32 usage.new
+ cp usage.new s
+ ll -i s usage.new
123973 -rwx------  1 gt0178a      1280 Sep 13 03:23 s*
123822 -rw-r--r--  1 gt0178a      1280 Sep 13 02:32 usage.new
+ cat
+ 1> s 0< /dev/null
+ ll -i s usage.new
123973 -rwx------  1 gt0178a         0 Sep 13 03:23 s*
123822 -rw-r--r--  1 gt0178a      1280 Sep 13 02:32 usage.new
-- 
BURNS,JIM
Georgia Institute of Technology, Box 30178, Atlanta Georgia, 30332
uucp:	  ...!{decvax,hplabs,ncar,purdue,rutgers}!gatech!prism!gt0178a
Internet: gt0178a at prism.gatech.edu



More information about the Comp.unix.shell mailing list