SUMMARY: Simple SED script

From: David McCall (cyberman@SONOMA.EDU)
Date: Thu Oct 31 1996 - 11:40:19 CST


Thanks again to all for the marvelous mirad of creativity...............

cat file | awk '{printf("ln -s ../Data1/%s\n",$0)}'

cat afile | awk '{ print VAR $0 }' VAR=fred

sed -e 's/^[a-zA-Z0-9]/ln -s ..\/DATA1\//g' <filename>

sed -e 's?^?ln -s ../Data1/?' filename

well, neither sed nor awk, but in vi:

:%s/^/ln -s ..\/Data1\//

% perl -pe 's,(^.*$),ln -s ../Data1/$1,' file

sed 's?^?ln -s ../Data1/?' < file_in > file_out

nawk '{print "ln -s ../Data1/"$0}' < file_in > file_out

David C. McCall
A. Systems Analyst
Network Backup Administrator
CYBER Systems Specialist
Sonoma State University
1801 E. Cotati Avenue
Rohnert Park, California 94928-3613
cyberman@sonoma.edu
707-664-3099 / 2348
                                           



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:14 CDT