My source command in the CShell goes like this :source /directory/of/script/script.cshThe script.csh executes and in between, waits for my password to confirm the identity.I am tired of typing the password everytime I have to source. So, since my password is constant, I was thinking of creating an alias which goes like this :alias <alias name> 'source /directory/of/script/script.csh; <my password>'The only catch is that, it is not taking in my password because, technically, my password is executed after the complete execution of the source.How do I go about it?If anyone needs any further info, I am happy to provide.EDIT: The original script.csh CAN NOT be modified to exclude the password because, I am not authorised to make such changes.EDIT (2) : The actual need is to pass on a value (a particular number, depending on what I am about to do after this) to the shell script script.csh while it is being executed, without user intervention.I used the word 'password' because, it was easier to explain using that example as authentication is some thing that is usually asked repeatedly in between a process, every time one tries something, and the execution does not proceed without it, or stops if a wrong input is given.. And, my case is synonymous : I have to give an input for the script to proceed, and it halts if a wrong input is given.
How to pass arguments to 'source' command?
alias;source;arguments
RESOLVED : Thanks to this answer, I was able to pipe in my input to the source command thereby removing my intervention. I created a script to do some of the other things I wanted to do, and added it to the alias, and is working fine.The command which worked was :echo $arg1 | source /directory/of/script/script.csh | tee /log-file/destination/filename.datthe tee command allowed me to capture the output of the source command into a .dat file. And for the benefit of others looking for a similar solution, another quick idea : one can pipe in any number of arguments to the command, but take care to pass it in the order in which it will be invoked / asked.Also, I agree to what others pointed out already, it would not be a good idea to pipe in your credentials like this and script t to avoid re-typing everytime.