Skip to content

Commit

Permalink
shellcheck.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
Vyacheslav Brover committed Oct 29, 2024
1 parent 01a0feb commit 1a6f5db
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions bulk.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash --noprofile
THIS=`dirname $0`
THIS=$( dirname $0 )
source $THIS/bash_common.sh
if [ $# -ne 5 ]; then
echo "Bulk-insert"
Expand All @@ -20,9 +20,9 @@ TABLE=$5
#set -x


TMP=`mktemp`
TMP=$( mktemp )
#echo $TMP
TMP=`basename $TMP`
TMP=$( basename $TMP )

cp $IN $BULK_LOCAL/$TMP
unix2dos -o $BULK_LOCAL/$TMP &> /dev/null
Expand Down
2 changes: 1 addition & 1 deletion check_file.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash --noprofile
THIS=`dirname $0`
THIS=$( dirname $0 )
source $THIS/bash_common.sh
if [ $# -ne 2 ]; then
echo "#1: file or directory path to check"
Expand Down
4 changes: 2 additions & 2 deletions check_tmp.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/bin/bash --noprofile
THIS=`dirname $0`
THIS=$( dirname $0 )
source $THIS/bash_common.sh

AVAILABLE=`df -k /tmp | tail -1 | awk '{print $4};'`
AVAILABLE=$( df -k /tmp | tail -1 | awk '{print $4};' )
if [ $AVAILABLE -lt 1000000 ]; then # PAR
error "Space available on /tmp is $AVAILABLE Kb"
fi
2 changes: 1 addition & 1 deletion cpuinfo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash --noprofile
THIS=`dirname $0`
THIS=$( dirname $0 )
source $THIS/bash_common.sh

grep MHz /proc/cpuinfo | sed 's/^.*: //1' | $THIS/dm/count
1 change: 1 addition & 0 deletions date.sh
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#!/bin/bash --noprofile
date +"%Y-%m-%d %H:%M"
2 changes: 1 addition & 1 deletion dir2empty_files.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash --noprofile
THIS=`dirname $0`
THIS=$( dirname $0 )
source $THIS/bash_common.sh
if [ $# -ne 1 ]; then
echo "Print file names of empty files"
Expand Down
2 changes: 1 addition & 1 deletion dir2filesize.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash --noprofile
THIS=`dirname $0`
THIS=$( dirname $0 )
source $THIS/bash_common.sh
if [ $# -ne 1 ]; then
echo "Sort files by size"
Expand Down
2 changes: 1 addition & 1 deletion dir2log.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash --noprofile
THIS=`dirname $0`
THIS=$( dirname $0 )
source $THIS/bash_common.sh
if [ $# -ne 1 ]; then
echo "Create #1.log/ and populate with items from #1/"
Expand Down
2 changes: 1 addition & 1 deletion dir_hash_init.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash --noprofile
THIS=`$( dirname $0 )
THIS=$( dirname $0 )
source $THIS/bash_common.sh
if [ $# -ne 2 ]; then
echo "Create hashes in a directory for trav '%h'"
Expand Down
2 changes: 1 addition & 1 deletion dir_rm_empty.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash --noprofile
THIS=`dirname $0`
THIS=$( dirname $0 )
source $THIS/bash_common.sh
if [ $# -ne 1 ]; then
echo "Remove empty files"
Expand Down

0 comments on commit 1a6f5db

Please sign in to comment.