LINUX LITE 7.2 FINAL RELEASED - SEE RELEASE ANNOUNCEMENTS SECTION FOR DETAILS


Poll: What shell do YOU use for scripting or command-line on LL?
You do not have permission to vote in this poll.
bash
88.89%
8 88.89%
csh
0%
0 0%
tcsh
0%
0 0%
fish
11.11%
1 11.11%
Other shell, or 2 shells for different purposes (please comment)
0%
0 0%
Total 9 vote(s) 100%
* You voted for this item. [Show Results]

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What shell do YOU use for scripting or command-line on LL?
#11
(09-16-2018, 02:47 PM)Moltke link Wrote:
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!

[member=7109]Moltke[/member]  yes it will be good using the second edition.
Thank You for the link, I've saved it, I'll work through the current 2 books (second edition and pro bash) first it will be useful for the examples and explanations as you wrote Smile
Reply
#12
Thanks for the helpful links about scripting, [member=7109]Moltke[/member] .

I use the fish shell https://fishshell.com/ for most of my stuff (I installed it via Synaptic). It's very user-friendly, and has good use of color.

On the command-line, if I type in something that looks syntactically wrong to the shell, it'll highlight it in red, which is helpful to me. It also displays autosuggest on command line without me needing to hit tab or whatever (just hit right arrow to accept autosuggestion, or carry on typing whatever I was typing if I don't want to accept autosuggestion).

I still have bash as my login user shell, but I switch to the fish shell for 99% of whatever I'm doing, including shell scripting. The fish shell just seems more intuitive to me, and the autosuggest feature on command line has definitely resulted in me getting things done a lot faster.
Using Linux Lite for everything now. I put it on my desktop and my laptop. Woohoo!
Reply
#13
You're welcome [member=6960]Vera[/member]

Quote:The fish shell just seems more intuitive to me, and the autosuggest feature on command line has definitely resulted in me getting things done a lot faster.

I also use fish for repetitive tasks since as you stated its auto-completion feature is most useful in those cases, so I don't have to type over and over the same commands. But I use bash as the default one. Truth is I don't do/know much scripting, I'm learning how to. Smile

You're very welcome [member=411]bitsnpcs[/member] glad you found it useful.
Without each others help there ain't no hope for us Smile
Need a translation service? https://www.deepl.com/es/translator
Reply
#14
[member=7109]Moltke[/member] can you add the links in to the threads for the 2 books please ? Smile

Reply
#15
Quote:[member=7109]Moltke[/member] can you add the links in to the threads for the 2 books please ? Smile

Sure, I will. Smile
Without each others help there ain't no hope for us Smile
Need a translation service? https://www.deepl.com/es/translator
Reply
#16
[member=7109]Moltke[/member] ,

Thank you for the information!
chsh changes the login shell, I would leave that as it is though, since it is part of the OS.

I suggest that people won't touch the system-wide settings like this. It is so much safer to
just invoke #!/bin/bash to the user scripts instead of the usual #!/bin/sh (which points to dash shell in LL).
Reply
#17
[member=7701]kpanic[/member] it is completely safe to change your login shell and/or prompt to whatever else you want. No harm will be made. However, you can always make a backup of your .bashrc file before whatever change you plan to do and if for any reason you don't feel saisfied with the result or anything goes wrong, you can just replace the .bashrc and get everyhing back to its default. 

hope this helps! Smile

Without each others help there ain't no hope for us Smile
Need a translation service? https://www.deepl.com/es/translator
Reply
#18
(09-17-2018, 07:31 PM)Moltke link Wrote: [member=7701]kpanic[/member] it is completely safe to change your login shell and/or prompt to whatever else you want. No harm will be made. However, you can always make a backup of your .bashrc file before whatever change you plan to do and if for any reason you don't feel saisfied with the result or anything goes wrong, you can just replace the .bashrc and get everyhing back to its default. 

hope this helps! Smile


[member=7109]Moltke[/member] ,

If it is completely safe, please post this idea with a "HELPFUL TIP" tag on it - after all, you make the claim that
it is completely safe and no harm will be made.
Why should I make any backups if it's completely safe? Should it read then: "not so completely safe" ?

I'm not making any changes, I use #!/bin/bash in my bash scripts, instead of the usual #!/bin/sh -
because /bin/sh points to dash shell.

Reply
#19
Quote:If it is completely safe, please post this idea with a "HELPFUL TIP" tag on it - after all, you make the claim that
it is completely safe and no harm will be made.
Why should I make any backups if it's completely safe? Should it read then: "not so completely safe" ?

Indeed. That's how smart Linux is  ;D otherwise those kind of files like .bashrc wouldn't be in your home folder where you can manipulate them at will and you'd need to become root in order to make any changes on them. It is completely safe to do so, I only suggested that in the event that you wished/were to change your shell login and /or prompt, you could make a backup of the the original .bashrc file, just for the sake of it, but it's really not neccesary.

Quote:I'm not making any changes, I use #!/bin/bash in my bash scripts, instead of the usual #!/bin/sh -
because /bin/sh points to dash shell.


I never said you should/have to change anything, that's entirely up to you. If you're happy with your config keep it that way no matter what anyone else may say. I use bash, fish, dash, zsh and switch back from one to the other and haven't had any problems whatsoever.  Like I said, it's entirely up to you and nobody else.

This is the contents of my .bashrc:

#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
EDITOR=/usr/bin/nano
# You may uncomment the following lines if you want `ls' to be colorized:
eval "`dircolors -b ~/.dircolorsrc`"
export LS_OPTIONS='--color=auto'
export PS1='\[\e[1;36m\][\t \u \[\e[0m\]\W \$] '

# Correct dir spellings
shopt -q -s cdspell

# Make sure display get updated when terminal window get resized
shopt -q -s checkwinsize

# Turn on the extended pattern matching features
shopt -q -s extglob

# Append rather than overwrite history on exit
shopt -s histappend

# Make multi-line commandsline in history
shopt -q -s cmdhist

# Get immediate notification of background job termination
set -o notify

# Store 2000 commands in history buffer
export HISTSIZE=2000

# Store 2000 commands in history FILE
export HISTFILESIZE=2000     

# Avoid duplicates in hisotry
export HISTIGNORE='&:[ ]*'

And this is how my terminal looks like:

[Image: t9uu8o.jpg]

Sorry if I bother you somehow, I didn't mean to do that, I simply shared something that it's posisible and completely, entirely safe to do, because like I said before, Linux is smart enough not to let you screw things up. Smile

Cheers!
Without each others help there ain't no hope for us Smile
Need a translation service? https://www.deepl.com/es/translator
Reply
#20
[member=7109]Moltke[/member] ,

Did I ever say I want to change my login shell?
If so, would you point the place I did so, please?

And for your information, I don't take instructions from noobs,
I was in this business when you were ~5 years old

Why don't you go and post your chsh-idea to the 'HELPFUL TIP' area?
I answer for you: because it is not a helpful idea!

Do you get it?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)