Scripts Articles RSS Feed
java Simple Java JDBC Program To Execute SQL Select Query
Viewed 750 times since Sun, Jan 9, 2022
Below is a sample Java JDBC program which takes database connection string as command line arguments and returns the SQL select query output   Replace the SQL Select query in the below code with the desired select query and modify the variabl... Read More
java Simple Java JDBC Program To Execute SQL Update Statement
Viewed 1207 times since Sun, Jan 9, 2022
Below is a sample Java JDBC program which takes database connection string as command line arguments and executes the SQL update statement.       Value to be updated in the table is passed as a command line argument.       Replace the SQL update stat... Read More
Transform XML to CSV Format | Unix String Pattern Manipulation The Ugly Way
Viewed 1346 times since Sun, Jan 9, 2022
Transform XML to CSV Format | Unix String Pattern Manipulation The Ugly Way Updated: Jun 22, 2020     Disclaimer: I do not claim the below method to be the best optimum method of transforming XML to CSV format on the Unix command p... Read More
Convert JSON to CSV with bash script
Viewed 9265 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 23212 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 3814 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 9737 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 37503 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 1299 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 3780 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 2095 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 2910 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 1152 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 2508 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