Hi jill buck and welcome to LQ.
Using Bash, you can enable verbose output by issuing the "set -xv" command, and you can do that at the start of a script, or in the command line. To disable this you issue the "set +xv" command. Note you need only disable in the command line. A script will start a new process, which will complete and the setting will not be retained. This will allow you to debug your lines.
You create a new file using the I/O redirection argument: >
You can append to a file using the I/O redirection argument: >>
This is not AIX, nor are the file structures for username and password saved anywhere. Are these files which you are creating, or on AIX were you reading system files? In Linux, the passwords are not stored in plain text, so any attempt to echo them will not work. If you have created these files, then that will work, however it is dangerous to do so.
I haven't tested, but I suspect that the cat will not like two file names together, otherwise all seems fine. So you may have to do two cat function calls, and thus one creates the file and the second one appends to it.
Enabling the verbose output will give you a better idea where the problem with your script exactly is.
You may not be using the Bash shell, but it is one of the most common ones. Issue the command:
to get an output of which shell you are using.
Please also reply to tell us if this is a script, or a series of command line arguments.