LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-19-2020, 11:15 PM   #1
atul2020
LQ Newbie
 
Registered: Oct 2020
Posts: 3

Rep: Reputation: Disabled
Linux scripting


pl suggest any book or tutorial for linux scripting from start
with practice examples
 
Old 10-20-2020, 01:09 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,830

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
google and duckduckgo what I know about
 
Old 10-20-2020, 02:11 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,305
Blog Entries: 3

Rep: Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720Reputation: 3720
The book The Linux Command Line by William Shotts has dedicated the dozen or so chapters in its fourth section to writing shell scripts. I'd recommend ordering a paper copy of the latest edition since it is much more practical to work with along side the computer, especially when learning something new.

I would also recommend working through sections 1 through 3 at least superficially first, even if they would just be review, before then digging into section 4. It will get you going with shells scripts and if you go through section 4 carefully, it you can actually learn quite a bit more than just the basics.
 
Old 10-20-2020, 03:08 AM   #4
atul2020
LQ Newbie
 
Registered: Oct 2020
Posts: 3

Original Poster
Rep: Reputation: Disabled
thank for ur suggestion
 
Old 10-20-2020, 04:28 AM   #5
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,570
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
If you have a sysvinit-based distro, it's useful to work your way through the startup scripts, working out how they do what they do.
 
1 members found this post helpful.
Old 10-20-2020, 04:34 AM   #6
platypo
Member
 
Registered: Sep 2015
Distribution: Debian, Archlinux
Posts: 140

Rep: Reputation: Disabled
Quote:
Originally Posted by atul2020 View Post
pl suggest any book or tutorial for linux scripting from start
with practice examples
What is commonly understood as linux scripting? Is it the knowledge of bash or some sort of understanding the topology of features and how best to interact with them in general?
 
Old 10-20-2020, 07:55 AM   #7
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,632

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by platypo View Post
What is commonly understood as linux scripting? Is it the knowledge of bash or some sort of understanding the topology of features and how best to interact with them in general?
You've been working with Linux for five years now, and have even said before you used tldp to learn about bash and scripting:
https://www.linuxquestions.org/quest...wn-4175665189/

A script is pretty much ANYTHING that is executed in a file, be it system commands, binaries, logic loops, etc. And can be bash, zsh, csh, or other languages.
Quote:
Originally Posted by atul2020
thank for ur suggestion
Read the LQ Rules about text-speak, and not using it, please.
 
Old 10-20-2020, 09:57 AM   #8
platypo
Member
 
Registered: Sep 2015
Distribution: Debian, Archlinux
Posts: 140

Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
You've been working with Linux for five years now, and have even said before you used tldp to learn about bash and scripting:
https://www.linuxquestions.org/quest...wn-4175665189/

A script is pretty much ANYTHING that is executed in a file, be it system commands, binaries, logic loops, etc. And can be bash, zsh, csh, or other languages.
Yes i don't know how much i could contribute to this thread with my humble knowledge but the bash scripting guides there are definatley very good.
Scripting seems like a flexible concept to me, i think many things that seem complicated at first can be done by a few words in the right file. I think the first thing to do before writing a script is defining what i want to achive with it.

Last edited by platypo; 10-20-2020 at 09:58 AM.
 
Old 10-20-2020, 01:31 PM   #9
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by platypo View Post
Yes i don't know how much i could contribute to this thread with my humble knowledge but the bash scripting guides there are definatley very good.
Scripting seems like a flexible concept to me, i think many things that seem complicated at first can be done by a few words in the right file. I think the first thing to do before writing a script is defining what i want to achive with it.
You are exactly right. ANY computer program requires planning and thought about the task to be accomplished, the tools to use (which may include a simple script, another already existing app, the language to to be used, etc.), and the steps required. A shell script requires at least a basic knowledge of the shell language and what it may do. Thus the suggestion by @Turbocapitalist to study and learn before possibly doing some harm by lack of knowledge.
 
Old 10-20-2020, 06:00 PM   #10
IlyaK
Member
 
Registered: Jun 2017
Location: The Netherlands
Distribution: Debian
Posts: 118

Rep: Reputation: 72
Very old but still very good about not only about shell, but also about sed, awk, tr, grep and other tools.
https://www.amazon.com/LINUX-Shell-P.../dp/B01JXPVAUG
 
Old 10-20-2020, 07:41 PM   #11
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
Also old but very good: Garrels's Bash Guide for Beginners and Cooper's Advanced Bash-Scripting Guide.
 
  


Reply



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
[SOLVED] Crash Course in Python Scripting needed - helper must know python scripting and about audio files ending in m4a BW-userx Programming 4 04-07-2017 01:55 PM
LXer: Shell Scripting Part I: Getting started with bash scripting LXer Syndicated Linux News 0 04-29-2015 08:03 AM
LXer: Scripting the Linux desktop, Part 2: Scripting Nautilus LXer Syndicated Linux News 0 02-17-2011 04:02 AM
Firefox Scripting Add-on (Scripting HTML / Javascript inside Firefox) linuxbeatswindows Programming 1 09-18-2009 10:09 PM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 04:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:28 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