Skip to content

Magenaut

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

array

How do I test if an item is in a bash array?

August 11, 2022 by Magenaut

Help for a simple script

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

Indirect return of all elements in an array

August 11, 2022 by Magenaut

The Bash man page describes use of ${!a} to return the contents of the variable whose name is the contents of a (a level of indirection).

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

parse one field from an JSON array into bash array

August 10, 2022 by Magenaut

I have a JSON output that contains a list of objects stored in a variable. (I may not be phrasing that right)

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

How to create an array of unique elements from a string/array in bash?

August 9, 2022 by Magenaut

If I have a string “1 2 3 2 1” – or an array [1,2,3,2,1] – how can I select the unique values, i.e.

Categories Q&A, Unix & Linux Tags array, patterns, string, uniq Leave a comment

How do I join an array of strings where each string has spaces?

August 9, 2022 by Magenaut

My bash script:

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

Delete an array in awk

August 9, 2022 by Magenaut

In awk, I can clear an array with a loop, making it an empty array, which is equivalent to deleting it.

Categories Q&A, Unix & Linux Tags array, awk Leave a comment

typeset -A is giving error in script

August 9, 2022 by Magenaut

I was using associative arrays in my script, hence I used to declare them by the

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

Intersection of two arrays in BASH

August 9, 2022 by Magenaut

I have two arrays like this:

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

Test for array support by shell

August 8, 2022 by Magenaut

Is there a concise way of testing for array support by the local Bourne-like shell at command line ?

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

jq – add objects from file into json array

August 7, 2022 by Magenaut

I want to add an array with elements and value into an existing json file using jq.

Categories Q&A, Unix & Linux Tags array, jq, json Leave a comment
Older posts
Page1 Page2 … Page4 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