Skip to content

Magenaut

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

shell

bashrc lazy substitution

August 8, 2022 by Magenaut

How does one get ~/.bashrc aliases to evaluate $() substitutions at run time, instead of at the time that ~/.bashrc is executed (when opening a terminal)?

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

intersection of two files according to the first column

August 8, 2022 by Magenaut

I have two files
in file A, there are sequence_numbers
in the other file B, there are many columns, and the first column is sequnce numbers,
I want to get a files with all the lines in the B with the sequence numbers which are in the A
how can I achieve this?
thanks

Categories Q&A, Unix & Linux Tags columns, join, scripting, shell, text-processing Leave a comment

Working of rm/ls with [0-9]

August 8, 2022 by Magenaut

I am learning the shell commands and came across the short tags eg.[0-9],[[:digit:]] etc.. As a proof of concept i tried deleting all the files with the rm command(i know its not a good practise but i am trying to understand how things work),like this

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

How to run time on multiple commands AND write the time output to file?

August 8, 2022 by Magenaut

I want to run time command to measure time of several commands.

Categories Q&A, Unix & Linux Tags command, shell, time-utility Leave a comment

When I redirect the output of ls to a file, the filename is included in that file. How can I avoid this?

August 8, 2022 by Magenaut

Observe:

Categories Q&A, Unix & Linux Tags command-line, io-redirection, ls, shell Leave a comment

Avoid running the script if a variable is not defined

August 8, 2022 by Magenaut

I have a script looks like:

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

Bash – how to make explicit operator precedence without creating a subshell

August 8, 2022 by Magenaut

I’m sure this is posted somewhere, but I haven’t been able to find it.

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

How to recover a shell after a disconnection

August 8, 2022 by Magenaut

Am doing some work on a remote CentOS 5.6 machine and my network keeps dropping.
Is there a way that I can recover my hung sessions after I reconnect?

Categories Q&A, Unix & Linux Tags linux, networking, session, shell Leave a comment

How do I convert an epoch timestamp to a human readable format on the cli?

August 8, 2022 by Magenaut

How do I convert an epoch timestamp to a human readable format on the cli? I think there’s a way to do it with date but the syntax eludes me (other ways welcome).

Categories Q&A, Unix & Linux Tags command-line, date, shell Leave a comment

Redirect both stderr and stdout to /dev/null with /bin/sh

August 8, 2022 by Magenaut

I have tried all sorts of ways to redirect both stdout and stderr to /dev/null without any success. I have almost my entire life run bash which I’ve never had this issue with, but for once in BSD I’m stuck with /bin/sh.

Categories Q&A, Unix & Linux Tags io-redirection, openbsd, shell Leave a comment
Older posts
Newer posts
← Previous Page1 … Page34 Page35 Page36 … Page46 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