loadYOURSELF

loadYOURSELF

Browsing Posts tagged script

CREATE USER [test] FOR LOGIN [test] WITH DEFAULT_SCHEMA=[dbo]

CREATE USER [oracle] WITHOUT LOGIN WITH DEFAULT_SCHEMA=[dbo]

CREATE TABLE [dbo].[table1](
[id] [int] NOT NULL,
[row] [varchar](50) NOT NULL,
[row2] [varchar](50) NOT NULL
) ON [PRIMARY]

Buy me a beer

This script counts one by one every time the user runs the script. “./scriptname reset” reset the counter.


!/bin/bash
if [ "$1" = "reset" ]
then
rm -rf fstore
fi
sayi=0
if [ -f fstore ]
then
sayi=`cat fstore`
fi
let sayi=$sayi+1
echo "INCREMENTING"
echo $sayi > fstore
echo -e -n "CURRENT="
echo $sayi

uses fstore file to remember the previous number.

Buy me a beer

if [ -f filename ]
then
echo "file exist"
else
echo "Sorry, file does not exist"
fi

if [ -d directory ]
then
echo "directory exist"
else
echo "Sorry, directory does not exist"
fi

Buy me a beer