Skip to content

Magenaut

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

shell-script

How can I get bash to exit on backtick failure in a similar way to pipefail?

August 10, 2022 by Magenaut

So I like to harden my bash scripts wherever I can (and when not able to delegate to a language like Python/Ruby) to ensure errors do not go uncaught.

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

How can I propagate my SSH pub key to a list of servers without having to type my password in over and over?

August 10, 2022 by Magenaut

I was recently given username/password access to a list of servers and want to propagate my SSH public key to these servers, so that I can login more easily.

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

Bash script to remove the oldest file from from a folder

August 10, 2022 by Magenaut

I want to make a bash script to delete the older file form a folder. Every time when I run the script will be deleted only one file, the older one. Can you help me with this?
Thanks

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

How to send variable to an inline shell-script?

August 10, 2022 by Magenaut

I run the following script:

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

Testing if a variable is empty in a shell script

August 10, 2022 by Magenaut

I have seen the following technique used many times on many different shells, to test if a variable is empty:

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

Splitting string by the first occurrence of a delimiter

August 10, 2022 by Magenaut

I have a string in the next format

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

Why the “-” in the “#! /bin/sh -” shebang?

August 10, 2022 by Magenaut

#! /bin/sh – Is (or at least was) often the recommended shebang to have a script interpreted by /bin/sh. Why not just #! /bin/sh or #!/bin/sh? What’s that – for? Answers: Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So … Read more

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

reason for exec in wrapper scripts

August 10, 2022 by Magenaut

I have seen wrapper script examples which in a nutshell are following:

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

How do I add X days to date and get new date?

August 10, 2022 by Magenaut

I have Linux ( RH 5.3) machine

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

How to open terminal, split to 9 terminals and switch between them using one script?

August 10, 2022 by Magenaut

I would like to open a terminal, split it to lets say 9 parts (3×3) and execute some bash script. But for each terminal part different script.

Categories Q&A, Unix & Linux Tags bash, gnome-terminator, perl, shell-script, terminal Leave a comment
Older posts
Newer posts
← Previous Page1 … Page5 Page6 Page7 … Page24 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