The Right Way to Export PATH in Shell

Posted on Nov 09, 2020 in Computer Science • Tagged with Computer Science, Shell, Bash, PATH, bashrc, bash_profile

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Fish Shell is preferred to Bash/Zsh. The following content is for Bash/Zsh only.

Some people suggest exporting PATH only in .bash_profile instead of in .bashrc …


Continue reading

Bash Equivalent of the ifmain Pattern in Python

Posted on Jul 28, 2022 in Computer Science • Tagged with Computer Science, programming, Shell, Bash, ifmain, Python, module, script, function, import, source

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Fish Shell is preferred to Bash/Zsh. The following content is for Bash/Zsh only.

#!/usr/bin/env bash

function install_icon.usage() {
    cat << EOF
NAME
    /scripts/sys …

Continue reading

Extended Globbing in Bash

Posted on Jun 04, 2022 in Computer Science • Tagged with Computer Science, programming, bash, shell, glob, globbing, extended

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Fish Shell is preferred to Bash/Zsh. The following content is for Bash/Zsh only.

Enable Extended Globbing

shopt -s extglob

Or you can run bash with …


Continue reading

Set Operations on Lines of Files

Posted on Jun 14, 2015 in Computer Science • Tagged with programming, set operations, file, lines, sort, uniq, comm, shell

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

** Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives. **

It is suggested that …


Continue reading

Use Autojump to Help Quick Navigation in Terminal in Linux

Posted on Oct 29, 2018 in OS • Tagged with Linux, autojump, cd, terminal, shell, navigation

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

** Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives. **

I personally is not …


Continue reading

Shell Equivalent in Different Operating Systems

Posted on Sep 02, 2020 in Computer Science • Tagged with Computer Science, OS, Linux, macOS, Windows, Shell, PowerShell

Things under legendu.net/outdated are outdated technologies that the author does not plan to update any more. Please look for better alternatives.

Fish Shell is preferred to Bash/Zsh. The following content is for Bash/Zsh only.

It suggested that you use IPython shell instead of Bash/Zsh shells …


Continue reading