I have looked for this elsewhere but not able to find something that matches my requirements.
The template below is the one I need to use :
dn: uid=$1,ou=home,dc=chan,dc=com
objectClass: organizationalPerson
objectClass: person
objectClass: inetOrgPerson
objectClass: top
cn: $2
sn: $3
userid: $1
userPassword:
I need to script in such a way that populates the following fields $1,$2,$3,$4 with the input that I give it and then outputs to a new file thus allowing to run it using the blank template.