Skip to content

Magenaut

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

bash

How to stop the loop bash script in terminal?

August 9, 2022 by Magenaut

For example,

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

“trap … INT TERM EXIT” really necessary?

August 9, 2022 by Magenaut

Many examples for trap use trap ... INT TERM EXIT for cleanup tasks. But is it really necessary to list all the three sigspecs?

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

Bash overwrites the first line, PS1 bash prompt

August 9, 2022 by Magenaut

I have played around with PS1 and PROMPT_COMMAND in bash to create a zsh-style right side prompt. I have a solution who almost works.

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

Is it possible for bash completion to cycle through the alternatives?

August 9, 2022 by Magenaut

When using bash completion and an a number of characters have been entered, tabbing ceases to work when the prefix you have typed is matched by more than one of the possibilities.

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

Why does a=0; let a++ return exit code 1?

August 9, 2022 by Magenaut

Try it:

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

How to exclude some files from filename expansion mechanism in bash?

August 9, 2022 by Magenaut

I have ubuntu file system directories in the root directory and I accidentally copied hundreds of files into root directory.

Categories Q&A, Unix & Linux Tags bash, bash-expansion, filenames, rm, wildcards Leave a comment

Padding trailing whitespaces in a string with another character

August 9, 2022 by Magenaut

I’d like to output hello world over 20 characters.

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

Trouble in script with spaces in filename

August 9, 2022 by Magenaut

I’ve got a script that scp’s a file from remote host back to local. Sometimes the file names contain spaces. scp does not like spaces in its file names. For some reason my attempts at handling the spaces have not resulted in the correct scp path.

Categories Q&A, Unix & Linux Tags bash, escape-characters, quoting, scripting, shell Leave a comment

Pipelined Sed does not work on found filename inside Bash command substitution when invoked from Find “-exec”

August 9, 2022 by Magenaut

./sample.txt Specimen_before.TXT ./sample.TXT Specimen_after.TXT

Categories Q&A, Unix & Linux Tags bash, command-substitution, pipe, sed Leave a comment

Can command substitution be nested in variable substitution?

August 9, 2022 by Magenaut

I would like to use variable substitution on a particular string that I access via a command. For example, if I copy something into my clipboard, I can access it like this.

Categories Q&A, Unix & Linux Tags bash, command-substitution, variable-substitution Leave a comment
Older posts
Newer posts
← Previous Page1 … Page23 Page24 Page25 … 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