LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell Scripting (https://www.linuxquestions.org/questions/linux-newbie-8/shell-scripting-4175610780/)

sampy12345 07-28-2017 03:23 AM

Shell Scripting
 
Hi ALL,

I have been using linux from past few months and can anybody suggest how to start writing shell scripts an any sites which helps in this.

Also help me in sharing a site which will be helpfull in learning linux indepth

Turbocapitalist 07-28-2017 04:38 AM

Welcome.

There are more shell scripting tutorials around than you can shake a stick at. It is a little hard though to sort the good ones from the not so good ones. This one seems ok but has a little bit long introduction:

https://bash.cyberciti.biz/guide/Main_Page

http://tldp.org/LDP/abs/html/

I'd recommend learning bash, which is usually the default. zsh and ksh should also be fairly compatible. But keep an eye on the bare POSIX shells such as dash. Use one of them for scripting when you can.

You'll get the most practice if you run natively. So I'd also recommend upgrading the desktop or notebook you are using to Linux Mint or Ubuntu, if it does not already have a distro "on bare metal". If you need legacy systems, they can be run better in a VM with snapshots to save the last known good version.

aragorn2101 07-28-2017 05:45 AM

Check these out:

Bash Guide for Beginners: http://www.tldp.org/LDP/Bash-Beginne...tml/index.html

And you can get so much more at: http://www.tldp.org/guides.html and http://www.tldp.org/

hazel 07-28-2017 05:53 AM

If your system uses sysvinit, go through the boot scripts step by step. You can learn a lot that way.

chrism01 07-28-2017 07:06 AM

Quote:

Also help me in sharing a site which will be helpfull in learning linux indepth
That's a big ask; its a very large subject... ;)
Try this www.linuxtopia.org

rtmistler 07-28-2017 08:02 AM

Quote:

Originally Posted by sampy12345 (Post 5740920)
I have been using linux from past few months and can anybody suggest how to start writing shell scripts an any sites which helps in this.

The links on bash scripting offered by aragorn2101 and Turbocapitalist are either exact ones which I would've offered, or fairly close.

I also have an old blog entry on bash scripting if you wish to read some techniques about debugging shell scripts.

Start reading shell scripts, especially the examples shown in the beginners guide to bash scripting, and start writing your own scripts.

Use the Programming forum to aid you with your script questions as you proceed with your attempts. Please be aware that if you do nothing and merely ask for scripts, you'll receive responses asking what you have tried.
Quote:

Originally Posted by sampy12345 (Post 5740920)
Also help me in sharing a site which will be helpfull in learning linux indepth

LinuxQuestions.org


All times are GMT -5. The time now is 05:12 AM.