Skip to content

Magenaut

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

bash

Insert text in specific lines of a file

August 8, 2022 by Magenaut

How can I insert some text in specific lines of a file? What is the simplest method that I can use? (bash, sed, awk?)

Categories Q&A, Unix & Linux Tags awk, bash, sed, text-processing Leave a comment

Multiple commands during an SSH inside an SSH session

August 8, 2022 by Magenaut

I have a local machine which is supposed to make an SSH session to a remote master machine and then another inner SSH session from the master to each of some remote slaves, and then execute 2 commands i.e. to delete a specific directory and recreate it.

Categories Q&A, Unix & Linux Tags amazon-ec2, bash, read, ssh Leave a comment

Non-interactive shell expand alias

August 8, 2022 by Magenaut

I’m having trouble getting aliases to expand on my hosting account when I run a command like:

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

JSON array to bash variables using jq

August 8, 2022 by Magenaut

I’ve got a JSON array like so:

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

Why isn’t [ -n ] false like [ -n “” ]?

August 8, 2022 by Magenaut

My question is on return values produced by this code:

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

How do you recall the last (n-th?) passed argument of the previous command you used with bash?

August 8, 2022 by Magenaut

Often times I issue different commands on the same file. For example:

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

is there a way to set coloring for cd tab complete?

August 8, 2022 by Magenaut

I use ubuntu 11.04.

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

Have xargs use alias instead of binary

August 8, 2022 by Magenaut

Bash 4.2 on CentOS 6.5:

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

In a bash shell script, writing a for loop that iterates over string values

August 8, 2022 by Magenaut

In bash, I know that it is possible to write a for loop in which some loop control variable i iterates over specified integers. For example, I can write a bash shell script that prints the integers between 1 and 10:

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

How should I add users non-interactively?

August 8, 2022 by Magenaut

I have a set of users I need to add to a new system as part of a BASH script that preps my server. How can I non-interactively add the user, create their home directory, set the group, and enter a default password?

Categories Q&A, Unix & Linux Tags bash, useradd Leave a comment
Older posts
Newer posts
← Previous Page1 … Page35 Page36 Page37 … 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