Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

bash

What is the function of bash shebang?

August 9, 2022 by Magenaut

Interpreter directives allow scripts and data files to be used as
commands, hiding the details of their implementation from users and
other programs, by removing the need to prefix scripts with their
interpreter on the command line.

Categories Q&A, Unix & Linux Tags bash, scripting, shell, shell-script Leave a comment

How process substitution is implemented in bash?

August 9, 2022 by Magenaut

I was researching the other question, when I realized I don’t understand what’s happening under the hood, what are those /dev/fd/* files and how come child processes can open them.

Categories Q&A, Unix & Linux Tags bash, process-substitution Leave a comment

Question about behavior of control key shortcuts

August 9, 2022 by Magenaut

I am confused about how Ctrl-key combinations work in terminal. In bash man page, there are various combinations such as:

Categories Q&A, Unix & Linux Tags bash, escape-characters, keyboard-shortcuts, terminal Leave a comment

Number of files containing a given string

August 9, 2022 by Magenaut

How can I count the number of files (in a directory) containing a given string as input in bash/sh?

Categories Q&A, Unix & Linux Tags bash, files, grep, shell Leave a comment

How to customize PS1 properly?

August 9, 2022 by Magenaut

I customized my bash with this in my bashrc

Categories Q&A, Unix & Linux Tags bash, prompt Leave a comment

How can I use a variable as a case condition?

August 9, 2022 by Magenaut

I am trying to use a variable consisting of different strings separated with a | as a case statement test. For example:

Categories Q&A, Unix & Linux Tags bash, case, shell-script Leave a comment

How to pass parameters to function in a bash script?

August 9, 2022 by Magenaut

I’d like to write a function that I can call from a script with many different variables. For some reasons I’m having a lot of trouble doing this. Examples I’ve read always just use a global variable but that wouldn’t make my code much more readable as far as I can see.

Categories Q&A, Unix & Linux Tags bash, function, parameter, syntax Leave a comment

How to read dash files

August 9, 2022 by Magenaut

How can I read a dash file from the terminal other than delimiting it with ./

Categories Q&A, Unix & Linux Tags bash, cat Leave a comment

How to cycle through reverse-i-search in BASH?

August 9, 2022 by Magenaut

In the terminal, I can type Ctrl + R to search for a matching command previously typed in BASH. E.g., if I type Ctrl + R then grep, it lists my last grep command, and I can hit enter to use it. This only gives one suggestion though. Is there any way to cycle through other previously typed matching commands?

Categories Q&A, Unix & Linux Tags bash Leave a comment

Why do I sometimes get repeatedly prompted with “>” in the terminal?

August 9, 2022 by Magenaut

Alright, when I run certain commands the wrong way, (misspelled, etc.) The terminal outputs this: > instead of computername:workingfolder username$, and when I type enter it goes like this:

Categories Q&A, Unix & Linux Tags bash, command-line, prompt, shell Leave a comment
Older posts
Newer posts
← Previous Page1 … Page22 Page23 Page24 … Page65 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress