interactive script in script
I'm busy with a user migration task...
I have to develop a script (let's call it myscript) which puts new users into a LDAP directory. The script has to fetch all the user information (name, UID, GID, password, home directory, shell, description) from file.
There is another script (let's call it corpscript) that does the same thing but interactively. It prompts for the user name, password, etc.
I have the script (myscript) that reads the source file perfectly. I put "corpscript" and its arguments into "myscript" to put the new users into the LDAP. Actually, I need to solve somehow, to use the interactive (corpscript) non-interactively. I have all the user's attributes parsed, I just need to give them to the corpscript as user responses.
Any idea would be appreciated!