Skip to content

Magenaut

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

bash

How to run a program in a clean environment in bash?

August 10, 2022 by Magenaut

I want to run a program in an empty environment (i.e. with no envariables set). How to do this in bash?

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

Why is a variable visible in a subshell?

August 10, 2022 by Magenaut

The Learning Bash Book mentions that a subshell will inherit only environment variables and file descriptors, etc., and that it will not inherit variables that are not exported:

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

Background process of subshell strange behaviour

August 10, 2022 by Magenaut

I wonder why some similar bash commands behave the way they do.

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

Is it possible to strace the builtin commands to Bash?

August 10, 2022 by Magenaut

Inspired by this question, titled: When are the built-in commands loaded to memory, while attempting to answer this I tried the following command and was a bit surprised that I couldn’t run it:

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

Setting IFS for a single statement

August 10, 2022 by Magenaut

I know that a custom IFS value can be set for the scope of a single command/built-in. Is there a way to set a custom IFS value for a single statement?? Apparently not, since based on the below the global IFS value is affected when this is attempted

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

How to use a variable as part of an array name

August 10, 2022 by Magenaut

I have two arrays:

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

How do I loop through only directories in bash?

August 10, 2022 by Magenaut

I have a folder with some directories and some files (some are hidden, beginning with dot).

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

Bash: calculate the time elapsed between two timestamps

August 10, 2022 by Magenaut

I have written a script that notifies me when a value is not within a given range. All values “out of range” are logged in a set of per day files.

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

How to display control characters (^C, ^D, ^[, …) differently in the shell

August 10, 2022 by Magenaut

When you type control characters in the shell they get displayed using what is called “caret notation”. Escape for example gets written as ^[ in caret notation.

Categories Q&A, Unix & Linux Tags bash, colors, display, readline, special-characters Leave a comment

Is it possible to set Gnome Terminal’s title to “[email protected]” for whatever host I’m connected to?

August 10, 2022 by Magenaut

I’d like to set the terminal title to [email protected] so I can easily tell which machine I’m connected to from the window title. Is there a way to do this from SSH or from GNOME Terminal?

Categories [email protected], Q&A, Unix & Linux Tags bash, gnome-terminal, ssh, window-title Leave a comment
Older posts
Newer posts
← Previous Page1 … Page15 Page16 Page17 … 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