Linux Lite Forums
What shell do YOU use for scripting or command-line on LL? - Printable Version

+- Linux Lite Forums (https://www.freecinema2022.gq/forums)
+-- Forum: Development (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=7)
+--- Forum: Scripting and Bash (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=32)
+--- Thread: What shell do YOU use for scripting or command-line on LL? (/showthread.php?tid=5381)

Pages: 1 2 3


What shell do YOU use for scripting or command-line on LL? - Vera - 06-13-2018

Interested to see what shell people are using for their scripting and/or command-line purposes. Thanks!


Re: What shell do YOU use for scripting or command-line on LL? - bitsnpcs - 09-12-2018

I am learning to use bash.


Re: What shell do YOU use for scripting or command-line on LL? - kpanic - 09-13-2018

(09-12-2018, 08:38 PM)bitsnpcs link Wrote: I am learning to use bash.

GZ man, and Vera too, of course!
Shell scripting is the most powerful tool to use. And a child can learn it (with the time they use in
all those 'social media' sites).

Ps.
To Vera: I begin the scripts with
#!/bin/bash
# explicitely, because bash is the best shell but it is not the default shell in LL



Re: What shell do YOU use for scripting or command-line on LL? - bitsnpcs - 09-13-2018

(09-13-2018, 10:06 PM)kpanic link Wrote: [quote author=bitsnpcs link=topic=5568.msg43098#msg43098 date=1536784704]
I am learning to use bash.

GZ woman, and Vera too, of course!
Shell scripting is the most powerful tool to use. And a child can learn it (with the time they use in
all those 'social media' sites).

Ps.
To Vera: I begin the scripts with
#!/bin/bash
# explicitely, because bash is the best shell but it is not the default shell in LL

[/quote]


Re: What shell do YOU use for scripting or command-line on LL? - bitsnpcs - 09-14-2018

There is some scripting at the end of the Linux Command Line book I use, I am not anywhere near the end yet, as I learn slowly and stop start when disrupted for long periods at a time.
I also learn from Linux Bible, need to fix virtualbox before can carry on with that. Just havent been motivated to do so yet.
After these books I have the one to start titled,  Linux Command Line and Shell Scripting Bible.
Hopefully in some future year when/if I manage to complete those I will have a basic foundation to progress from.

I use social sites such as this forum, and YouTube for music.

Is it like the shebang ?

Code:
#!/usr/bin/env python

I used in the first Python apps I made so they execute


Re: What shell do YOU use for scripting or command-line on LL? - Moltke - 09-15-2018

Quote:explicitely, because bash is the best shell but it is not the default shell in LL
 
[member=7701]kpanic[/member]
To stablish bash as your default shell you can use the cat and chsh commands. First, in your terminal type
Code:
$ cat /etc/shells


This will list all available/installed shells in your system, then use chsh to change to a different shell, say bash.
Code:
$ chsh -s /usr/bash


it will ask for your password, type it in, logout/login, open a terminal, type
Code:
$ echo $Shell
and you should see the new shell's name displayed.


[Image: 20fqgrn.jpg]

[Image: 11sh4lf.jpg]

[member=411]bitsnpcs[/member]  there's a very good book you might find quite helpful; The Linux Shell Scripting Cookbook. You can grab it here: https://gutl.jovenclub.cu/wp-content/uploads/2013/10/Linux.Shell_.Scripting.Cookbook.pdf




Re: What shell do YOU use for scripting or command-line on LL? - bitsnpcs - 09-15-2018

(09-15-2018, 03:12 AM)Moltke link Wrote: [member=411]bitsnpcs[/member]  there's a very good book you might find quite helpful; The Linux Shell Scripting Cookbook. You can grab it here: https://gutl.jovenclub.cu/wp-content/uploads/2013/10/Linux.Shell_.Scripting.Cookbook.pdf

[member=7109]Moltke[/member] Thank You, I've grabbed it and will work through it Smile
I have done the first example in book


[Image: Screenshot_2018_09_15_09_21_11.png]

I like it 8) do you want to make a thread for this book [member=7109]Moltke[/member] ?
I had a play with the options at end of the section, and some trial/error spacing, I wasn't able to get Name  and Mark in to the centre of their color blocks yet, also had to copy/paste the name character as wasn't sure how to do it in terminal -

[Image: Screenshot_2018_09_15_12_41_58.png]


Re: What shell do YOU use for scripting or command-line on LL? - Moltke - 09-15-2018

Quote:I like it 8) do you want to make a thread for this book [member=7109]Moltke[/member]?

[member=411]bitsnpcs[/member]  I'd love to! Smile I've been reading it and trying some of the examples in the book, and it'll be really helpful to share ideas, doubts, experience, thoughts with someone else and thus improving the learning experience, so sure, let's make it happen! There's only one thing you should know; I might not be able to post an answer/reply as soon as I wish. I'm dealing with some problems with my wired connection and as a matter of fact I'm currently using a usb dongle and it's bandwith limited so the pc isn't online 24/7 but only when I want/need it to. Other than that I'd be more than happy to be patr of it!  ;D 

BTW, I just noticed there's a revisited third edition of the book published last year, the one you and I have is the second one. I don't know what the differences might be, if any though, but you can grab it here: https://coderprog.com/linux-shell-scripting-cookbook-3rd/

Also, I found this other one and it lloks quite interesting https://www.pdfdrive.com/pro-bash-programming-scripting-the-gnulinux-shell-e18888064.html


Re: What shell do YOU use for scripting or command-line on LL? - bitsnpcs - 09-15-2018

[member=7109]Moltke[/member] that will be great 8) , I understand about your connection at the moment.

Thank you for the links. Smile
It appears the third version has lots of empty space, maybe missing images. Example in Second edition I am on page 32, this is spread out and up to page 106 in the third edition.

I'll work through the pro bash book too, it does look interesting as well.



Re: What shell do YOU use for scripting or command-line on LL? - Moltke - 09-16-2018

Quote:It appears the third version has lots of empty space, maybe missing images

[member=411]bitsnpcs[/member]  yes, you're right. I noticed that too. Anyway, it doesn't seem to be too many changes from the second edition, so I guess we're good using that one.  ;D
I just found this https://bash.cyberciti.biz/guide/Main_Page it has several examples and explanatios are quite clear. I think it's a good resource for learning scripting and bash. Hope you like it. Smile

cheers!