#!/bin/bash
echo Please enter your first name:
read fname
echo Please enter your last name:
read lname
touch info.log
echo -e "Fname=$fname\nLname=$lname\n" >> info.log
cat info.log | while read line;
do
echo | awk '
{
print substr ("'"$line"'",7,20)
}'
done
Fname=$fname
export Fname #makes and an environmental variable
/bin/bash #invoke child bash shell with Fname set
Sameer bhai i can not test it right now...light chali gaye [:d]
As soon as electricity comes back i will try....
by the way sameer bhai the following code is printing the values of the variables
echo | awk '
{
print substr ("'"$line"'",7,20)
}'
i dont want it to print the values...
I am very sorry i might be irritating you, sorry...