Skip to content

Magenaut

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

bash

Trap, ERR, and echoing the error line

August 9, 2022 by Magenaut

I’m trying to create some error reporting using a Trap to call a function on all errors:

Categories Q&A, Unix & Linux Tags bash, error-handling, shell-script, trap Leave a comment

Display Spinner while waiting for some process to finish

August 9, 2022 by Magenaut

How can I show spinner till command line finish it is job? In other words, If I am running a script and I want to show spinner while this script is running and the spinner disappears when the script finish it is job.

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

When do you use brace expansion?

August 9, 2022 by Magenaut

I understand what brace expansion is, but I don’t know how best to use it.

Categories Q&A, Unix & Linux Tags bash, brace-expansion, ksh, shell, zsh Leave a comment

Bash: double equals vs -eq

August 9, 2022 by Magenaut

I am doing integer comparison in bash (trying to see if the user is running as root), and I found two different ways of doing it:

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

How to delete part of a path in an interactive shell?

August 9, 2022 by Magenaut

Is there a shortcut in bash and zsh to delete one component of a path? For example, if I type ls ~/local/color/, and the cursor is at the end of line, is there a shortcut to delete the color/ at the end? Ideally I want solutions in both vi-mode and emacs-mode

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

How to create a sequence with leading zeroes using brace expansion

August 9, 2022 by Magenaut

When I use the following, I get a result as expected:

Categories Q&A, Unix & Linux Tags arithmetic, bash, brace-expansion Leave a comment

Create symlink – overwrite if one exists

August 9, 2022 by Magenaut

I want to take down data in /path/to/data/folder/month/date/hour/minute/file and symlink it to /path/to/recent/file and do this automatically every time a file is created.

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

How can I tell if I’m in a tmux session from a bash script?

August 9, 2022 by Magenaut

I like to keep my bash_profile in a git repository and clone it to whatever machines I have shell access to. Since I’m in tmux most of the time I have a [email protected] string in the status line, rather than its traditional spot in the shell prompt.

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

Fastest way to concatenate files

August 9, 2022 by Magenaut

I’ve got 10k+ files totaling over 20GB that I need to concatenate into one file.

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

How to execute a script in shell when a shortcut key is pressed

August 9, 2022 by Magenaut

How could I execute a script in Shell when a shortcut key is pressed.

Categories Q&A, Unix & Linux Tags bash, gnome-terminal, keyboard-shortcuts Leave a comment
Older posts
Newer posts
← Previous Page1 … Page30 Page31 Page32 … 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