A script that creates a file for weather precipitation is,
#!/bin/ksh x=10 b=snow c=rain d=snow e=hail echo "$x,$b,$c,$d,$e" > weatherfile exit 0
For the search and replace, what is the best way to implement this in a script?
From the command perspective would
sed be necessary?
My thoughts are that the following should work:
sed 3,8s/snow/dry/g weatherfile
Though what if
sed could not be used. Would I need to open and close the file and some how run
:3,8s/snow/dry/g while the file is open? How can this be implemented?