Skip to content

Magenaut

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

bash

Changing parent directory (../) with symlinks

August 7, 2022 by Magenaut

I have a symlink

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

Bash regex capture group

August 7, 2022 by Magenaut

I’m trying to match multiple alphanumeric values (this number could vary) from a string and save them to a bash capture group array. However, I’m only getting the first match:

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

Bash variable substitution of variable followed by underscore

August 7, 2022 by Magenaut

The variable BUILDNUMBER is set to value 230. I expect 230_ to be printed for the command echo $BUILDNUMBER_ but the output is empty as shown below.

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

Finding command execution time in hindsight

August 7, 2022 by Magenaut

I’ve just executed a long-running process from the bash prompt. In hindsight, I wish I’d run time on it, or noted down the time at which I kicked it off.

Categories Q&A, Unix & Linux Tags audit, bash, command-history, osx, timestamps Leave a comment

grep files from list

August 7, 2022 by Magenaut

I am trying to run grep against a list of a few hundred files:

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

How to customize Bash command completion?

August 7, 2022 by Magenaut

In bash, it’s easy enough to set up customized completion of command arguments using the complete built-in. For example, for a hypothetical command with a synopsis of

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

removing or clearing stack of popd/pushd paths

August 7, 2022 by Magenaut

After pushding too many times, I want to clear the whole stack of paths.

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

Compare two files for matching lines and store positive results

August 7, 2022 by Magenaut

I have two files. File 1: A0001 C001 B0003 C896 A0024 C234 . B1542 C231 . upto 28412 such lines File 2: A0001 A0024 B1542 . . and 12000 such lines. I want to compare File 2 against File 1 and store the matching lines from File 1. I tried Perl and Bash but none … Read more

Categories Q&A, Unix & Linux Tags bash, file-comparison, files Leave a comment

whiptail or dialog

August 7, 2022 by Magenaut

I am going to create a script which will use user input, so I decided to use whiptail.

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

what is the difference between >&2 and &>2

August 7, 2022 by Magenaut

There are two formats for redirecting standard output and standard error:

Categories Q&A, Unix & Linux Tags bash, io-redirection, stderr Leave a comment
Older posts
Newer posts
← Previous Page1 … Page54 Page55 Page56 … 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