LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-28-2017, 03:23 AM   #1
sampy12345
LQ Newbie
 
Registered: Jul 2017
Posts: 12

Rep: Reputation: Disabled
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
 
Old 07-28-2017, 04:38 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 6,893
Blog Entries: 3

Rep: Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575Reputation: 3575
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.
 
Old 07-28-2017, 05:45 AM   #3
aragorn2101
Member
 
Registered: Dec 2012
Location: Mauritius
Distribution: Slackware
Posts: 567

Rep: Reputation: 301Reputation: 301Reputation: 301Reputation: 301
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/
 
Old 07-28-2017, 05:53 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 6,892
Blog Entries: 17

Rep: Reputation: 4135Reputation: 4135Reputation: 4135Reputation: 4135Reputation: 4135Reputation: 4135Reputation: 4135Reputation: 4135Reputation: 4135Reputation: 4135Reputation: 4135
If your system uses sysvinit, go through the boot scripts step by step. You can learn a lot that way.
 
Old 07-28-2017, 07:06 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 7.7 (?), Centos 8.1
Posts: 18,237

Rep: Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711Reputation: 2711
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
 
Old 07-28-2017, 08:02 AM   #6
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,789
Blog Entries: 13

Rep: Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831Reputation: 4831
Quote:
Originally Posted by sampy12345 View Post
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 View Post
Also help me in sharing a site which will be helpfull in learning linux indepth
LinuxQuestions.org
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Shell Scripting Part 3: Decision Control Structures in Shell Scripts LXer Syndicated Linux News 0 05-05-2015 10:01 PM
LXer: Shell Scripting Part 2: Accepting Inputs and Performing Shell Arithmetic LXer Syndicated Linux News 0 04-30-2015 07:10 AM
LXer: Shell Scripting Part I: Getting started with bash scripting LXer Syndicated Linux News 0 04-29-2015 08:03 AM
win32,shell code,shell programming,shell scripting? mr.cracker Linux - Newbie 4 07-12-2013 11:20 PM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration