Hi gang: Need some help with "sed". The script below is working except for the sed command. It does replace the words I'm searching for but the change goes to standard out (screen) so the file is not updated. How do I get sed to modify the file?? I'm sure it something simple...
Thanks All !!! This is running Solaris 8
#! /bin/sh
# Begin shell script to modify the netmap
echo "Welcome to the netmap edit tool"
echo "What would you like to do?"
echo 1. Add a node to the netmap
echo 2. Modify a node in the netmap
echo 3. Delete a node in the netmap.
read choice
# Begin choice determination logic
if [ $choice = 1 ]
then
# logic to add a new node to current netmap
cat newnode >> netmap.cfg
# New Node info collection
echo " Enter the new node name"
read newnodename
Man... this was subtle... Here's the answer... has to redirect to a tmpfile and then cat to the file I'm using.... Thanks for the help era you got me pointed in the right direction..
# Begin choice determination logic
if [ $choice = 1 ]
then
# logic to add a new node to current netmap
# New Node info collection
echo " Enter the new node name"
read newnode