Skip to content

Instantly share code, notes, and snippets.

package main
import (
"log"
"net/http"
"net/http/httputil"
"net/url"
)
var (
@pavithran215
pavithran215 / main.go
Last active December 10, 2021 07:17
this program with take username password databasename and tablename from cmd line and retrieves the table data
package main
import (
"database/sql"
"flag"
"fmt"
"log"
_ "github.com/lib/pq"
)
#!/bin/bash
# c=$(( $1+$2 ))
# echo $c
while getopts "asmd" options;
do
case $options in
@pavithran215
pavithran215 / getOpts.sh
Created December 2, 2021 14:05
Example implementation of getOpts in shell script
while getopts "asmd" options;
do
case $options in
a)
echo addition
d=$2
f=$3
echo $(( $d+$f ))
;;