ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It seems pretty straight forward, outputting every line to the file cash_out, including the first argument ($1), the date, and the file (specified as $1) encrypted to the GPG key 44B6A97D and signed with the key 622455DE.
Is this homework? What books on BASH and scripting have you read.
The point is that we need to know where to start....
For example
The first line tells the system to run this script using the program "bash" which is found in /bin.
The second line sets a variable (FILE_NAME) to the value of the first argument passed to the script when it is called.
The third line gets the value of FILE_NAME and redirects it to a file named "cash_out". It is appended to this file.
In the fourth line, there may be an error. It is appending the output of the date command to a different file (cash_out.out) Also the /xyz/ path tells me that this is an example script and not a real one.
Do you know what the script is supposed to do??
One more tip: when learning bash scripting, try the commands one at a time to get a feel for how they work
The script is suppose to get a file from the Mainframe system and then encrypt that file and send it to our supplier, thats the objective of the script.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.