Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to generate the following file

Status
Not open for further replies.

hmehta

IS-IT--Management
Jun 5, 2002
27
US
The file has teh folloowing contents.
PKG=VZevpsrc
NAME=Evoice Portal Application Software
VERSION=2.8
ARCH=SPARC_Sol_2.8
CATEGORY=application
CLASSES=none replacessi
BASEDIR=/tt
DESC=Update to approot.xml (05/24/2002)


I needto write a awk script which would intercatively ask the user for a version and description. So the script would ask.
Please enter a version no:
User:2.9

Please enter a description: Update to web.xml
Please eneter a date:06/11/2002.

After the user enters this information the file shoudl look like.

PKG=VZevpsrc
NAME=Evoice Portal Application Software
VERSION=2.9
ARCH=SPARC_Sol_2.8
CATEGORY=application
CLASSES=none replacessi
BASEDIR=/tt
DESC=Update to web.xml (06/11/2002)

Can anybody suggest a script.
 
echo "Please enter a version no: \c" ;read ver
echo "Please enter a description: \c" ;read desc
echo "Please enter a date: \c" ;read date

{
echo "PKG=VZevpsrc"
echo "NAME=Evoice Portal Application Software"
echo "VERSION=$ver"
echo "ARCH=SPARC_Sol_2.8"
echo "CATEGORY=application"
echo "CLASSES=none replacessi"
echo 'BASEDIR=/tt'
echo DESC="$desc ($date)"
} > newfile

regards gregor Gregor.Weertman@mailcity.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top