LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash shell script of linux (https://www.linuxquestions.org/questions/linux-newbie-8/bash-shell-script-of-linux-934787/)

manoj jasawat 03-16-2012 07:42 AM

bash shell script of linux
 
create a script name is lang.sh shuch that when command given is lang.sh english then it shuld display hindi as message.when lang.sh hindi is given as input it shuld display english.other cases the stderr shuld be sent to /var/spool/mail/error.

please give me solution of this script ....

wpeckham 03-16-2012 01:01 PM

Homework?
 
Your post reads very like a homework assignment. Generally we do not answer such questions directly, but we may still be of some help.

What have you considered? Have you attempted or tested anything so far?

TB0ne 03-16-2012 02:19 PM

Quote:

Originally Posted by manoj jasawat (Post 4628291)
create a script name is lang.sh shuch that when command given is lang.sh english then it shuld display hindi as message.when lang.sh hindi is given as input it shuld display english.other cases the stderr shuld be sent to /var/spool/mail/error.

please give me solution of this script ....

Sorry, but you need to do your own homework. YOU are the one taking the class, and YOU are the one who needs to learn, not have people spoon-feed you answers.

As wpeckham said, what have you done/tried so far? Post what you've written, and where you're stuck, and we will help. But we will NOT write it for you. You can find THOUSANDS of bash scripting tutorials through Google that can help you:
http://tldp.org/LDP/abs/html/

David the H. 03-17-2012 12:33 PM

I'll give you a small hint. Try echoing the "$0" parameter.

Here are a few useful bash scripting references:
http://mywiki.wooledge.org/BashGuide
http://www.linuxcommand.org/index.php
http://mywiki.wooledge.org/BashFAQ
http://mywiki.wooledge.org/BashPitfalls
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:40 PM.