bigdaddy01
MIS
Calling all you gurus out there!
I have a list of files that I need to make backups of,
about 50 files. I have been trying to use the :map command in vi to insert a cp at the front of each line, then copy each line (with out the cp) add it to the same line and then add a .bak ext to each file
so the file looks like:
/usr/informix/etc/onconfig
/usr/informix/etc/sqlhosts
I want it it to look like :
cp /usr/informix/etc/onconfig /usr/informix/etc/onconfig.bak
cp /usr/informix/etc/sqlhosts /usr/informix/etc/sqlhosts.bak
I am using the map command to insert the cp:
:map # I cp ^[ k I cp
is there an easer way or am I barking up the wrong tree ?! , I am saving myself from RSI. lol.
Paul.
I have a list of files that I need to make backups of,
about 50 files. I have been trying to use the :map command in vi to insert a cp at the front of each line, then copy each line (with out the cp) add it to the same line and then add a .bak ext to each file
so the file looks like:
/usr/informix/etc/onconfig
/usr/informix/etc/sqlhosts
I want it it to look like :
cp /usr/informix/etc/onconfig /usr/informix/etc/onconfig.bak
cp /usr/informix/etc/sqlhosts /usr/informix/etc/sqlhosts.bak
I am using the map command to insert the cp:
:map # I cp ^[ k I cp
is there an easer way or am I barking up the wrong tree ?! , I am saving myself from RSI. lol.
Paul.