LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Knew the logic. But don't know how to work it. (https://www.linuxquestions.org/questions/linux-newbie-8/knew-the-logic-but-dont-know-how-to-work-it-4175419076/)

Gayathri25 07-28-2012 09:20 AM

Knew the logic. But don't know how to work it.
 
Hi,
I am new to Linux OS. I want some shell script programs. Can you help me to find out.

1. Shell script that takes a login name as a command line argument and reports to you when that person logs in.

2. Shell script that takes three command line arguments. The First argument is name of the destination file and the other two arguments are names of the files to be placed in the destination file.

If anyone knows please give me the code.

Regards,
Gayathri

273 07-28-2012 09:30 AM

For you first question not sure what you're asking but look at finger perhaps.
For your second look at cat.

David the H. 07-28-2012 11:00 AM

The descriptions sound suspiciously like cut&pasted homework assignments.

Quote:

Originally Posted by LQ rules
Do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.

If you have any specific problems we'll be glad to help you overcome them, but you're going to have to do the bulk of it yourself. We certainly aren't going to "give you the code".

If you don't even know where to begin, find yourself a good scripting tutorial and start working through it.

Here are a few useful bash scripting references:
http://mywiki.wooledge.org/BashGuide
http://mywiki.wooledge.org/BashFAQ
http://mywiki.wooledge.org/BashPitfalls
http://wiki.bash-hackers.org/scripting/newbie_traps
http://www.linuxcommand.org/index.php
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/index.html
http://www.gnu.org/software/bash/manual/bashref.html
http://wiki.bash-hackers.org/start
http://ss64.com/bash/


All times are GMT -5. The time now is 02:15 AM.