This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "$1, 2 =$2, 3=$3" | |
tail -n0 -F "$1"| while read LINE; do | |
(echo "$LINE" | grep -e "$3") && curl -X POST --silent --data-urlencode \ | |
"payload={ \"channel\": \"#tstpglogs\", \"text\": \"$( sed "s/\"/'/g" <<< $LINE )\"}" "$2"; | |
done | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### GIt prem delete a file | |
git filter-branch -f --index-filter "git rm -rf --cached --ignore-unmatch FOLDERNAME" -- --all | |
rm -rf .git/refs/original/ | |
### prune entries older than the specified time | |
git reflog expire --expire=now --all | |
### Cleanup unnecessary files and optimize the local repository; prune object older than now | |
git gc --prune=now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
to copy/ archive changed files on git commit to local repository this might help | |
in my case need was to copy to /r/edt/Data\ and\ Analytics/deploy/ | |
git hooks are located under .git\hooks under local respository | |
tosetup:: | |
$git lfs update | |
$ git lfs update --force | |
then update .git/hooks/post-comit | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################################################################### | |
### make a directory to store audit and archievd audcit file | |
########################################################################################### | |
export BASE_PATH=/home ###### THIS HAS TO BE SET where the auidt data and archived audit stuff goes | |
###### THIS HAS TO BE SET | |
export DB2_HOME=/home/db2inst1 | |
###### THIS HAS TO BE SET :: SCHEMA onto which data will be loaded | |
export DB2_SCHEMA=AUDIT | |
###### THIS HAS TO BE SET:: Set the Extract location | |
echo -e "\n\nDB2_HOME: $DB2_HOME\nDB2_SCHEMA: $DB2_SCHEMA\nEXTRACT_LOC_PATH: $EXTRACT_LOC_PATH\n\n" |