Scripts Articles RSS Feed
Convert JSON to CSV with bash script
Viewed 212 times since Mon, Jan 20, 2020
A tale of two formats: Converting JSON to CSV Peter Andersson Follow May 5, 2016 · 4 min read   So this just happened:- “Peter, can you send me a CSV of those search results?”- “…yeah, sure…give me a minute” We’d been looking ... Read More
Convert CSV to JSON with jq
Viewed 1472 times since Mon, Jan 20, 2020
jq the JSON processor is a new tool for command-line data mining. I’ve been using jq for a couple of months and it’s super useful. In this post I present a simple example of converting CSV to JSON using jq. Parsing CSV with jq is import... Read More
Convert CSV to JSON with bash script
Viewed 435 times since Mon, Jan 20, 2020
#!/bin/bash # CSV to JSON converter using BASH # original script from https://gist.github.com/dsliberty/3de707bc656cf757a0cb # Usage ./csv2json.sh input.csv > output.json # cat <input.csv> | csv2json > output.json #set -x shopt -s ... Read More
O’Reilly’s CD bookshelf
Viewed 4548 times since Wed, Jun 27, 2018
https://docstore.mik.ua/orelly/bookshelfs.html   The Java Reference Library, version 1.3 The Java Enterprise CD Bookshelf, Version 1.0 The Perl CD Bookshelf, version 1.0 ... Read More
Epoch & Unix Timestamp Conversion Tools
Viewed 13747 times since Fri, Jun 22, 2018
The current Unix epoch time is  1529656113   Convert epoch to human readable date and vice versa  [batch convert timestamps to human dates] GMT: Friday, 22 June 2018 07:40:23Your time zone: piątek, 22 czerwca 2018 09:40:23 GMT+02:00 DST Yr Mon D... Read More
Unix - eval command example
Viewed 342 times since Fri, Jun 8, 2018
Unix - eval command example   Have you ever have the need to remotely execute a long list of command to a list of unix machines to perform tasks like gathering their information? Well, if you did then you will mostly came across an issue where you ra... Read More
Unix - Find command examples
Viewed 549 times since Fri, Jun 8, 2018
Unix - Find command examples   Below are some find command examples on Unix OS. #find <path> <option> <value>#find /home/james/ -amin 10    ----File was last accessed n minutes ago.#find /home/james/ -atime 2    ----File was last ac... Read More
Unix - Examples for grep command
Viewed 1024 times since Fri, Jun 8, 2018
Unix - Examples for grep command   Below are some examples on the usage of grep and egrep in Unix. We are using file text.txt as our source file. Content of text.txt ================================================================== onetwothreefou... Read More
To do a quick check on the number of path present (does not mean all are Enabled] using for loop
Viewed 849 times since Fri, Jun 8, 2018
To do a quick check on the number of path present (does not mean all are Enabled] using for loop. ===================================================== for i in `/usr/sbin/lspath | grep scsi | awk  '{print $2}' | sort |uniq ` ;  do echo "$... Read More
bash for do done AIX
Viewed 383 times since Mon, Jun 4, 2018
for i in `lsdev -Cc adapter | egrep "^ent" | awk '{ print $1 }'` ;  do echo "#### $i ####" ;  lsattr -El $i ; echo "####      ####" ;  done Read More
Display basic information about Physical Volumes
Viewed 962 times since Sun, Jun 3, 2018
# Small script to display some interesting information about Physical Volumes DISP="1"; ls -l /dev/hdisk* | awk '{print $10 " " $5 $6}' | sed -e "s:/dev/::" -e "s/,/ /"  | while read DISK MAJOR MINORdo   SIZE=$(bootinfo -s $DISK)   LUN=$(... Read More