# updates my little 1 TB "soapbox" style usb drive with items that it should contain.
-function liney()
-{
- echo
- echo ==============
- echo
-}
-
function get_source()
{
folder="$1"; shift
popd
}
-liney
+sep
ls /media/fred/soapboxdrive
if [ $? -ne 0 ]; then
exit 1
fi
-liney
+sep
echo synching walrus...
rsync -av /z/walrus/* /media/fred/soapboxdrive/walrus/
exit 1
fi
-liney
+sep
echo synching musix...
rsync -av /z/musix/* /media/fred/soapboxdrive/musix/
exit 1
fi
-liney
+sep
echo getting latest fred codes...
pushd /media/fred/soapboxdrive
get_source extra_brain
-liney
+sep
echo getting latest gffs codes...
get_source gffs
popd
-liney
+sep
echo Updated all portions of the soapbox drive successfully.
-o -iname "*.iar" -o -iname "*.oar" -o -iname "*.bz2" -o -iname "*.snarf" \
>"$TMPFILE"
-while read line; do
- bash $FEISTY_MEOW_SCRIPTS/archival/list_arch.sh "$line" 2>&1 | grep -i "$pattern" >/dev/null
- if [ $? -eq 0 ]; then echo ==== Found pattern in $line ====; fi
+while read input_text; do
+ bash $FEISTY_MEOW_SCRIPTS/archival/list_arch.sh "$input_text" 2>&1 | grep -i "$pattern" >/dev/null
+ if [ $? -eq 0 ]; then echo ==== Found pattern in $input_text ====; fi
done <"$TMPFILE"
\rm -f "$TMPFILE"
#cat $NAME_LIST_TEMP_FILE
#echo ====================================================
- while read line; do
-#echo line is $line
- count=$(grep -h -v -c "^[ ]*$" $line)
+ while read input_text; do
+#echo input_text is $input_text
+ count=$(grep -h -v -c "^[ ]*$" $input_text)
TOTALS=$(($TOTALS + $count))
#echo total is $TOTALS now
done < "$NAME_LIST_TEMP_FILE"
#!/bin/bash
if [ -f "$BUILD_LIST_FILE" ]; then
- echo Compiling [$(cat $BUILD_LIST_FILE | while read line; do echo $(basename $line); done )]
+ echo Compiling [$(cat $BUILD_LIST_FILE | while read input_text; do echo $(basename $input_text); done )]
rm -f $(cat $BUILD_WHACK_FILE)
#echo got line to run: $*
eval "${@}"
find . -name "cur" >$folderlist
-while read line; do echo -n "$line -- " ; find "$line" -type f | wc -l ; done < $folderlist
+while read input_text; do echo -n "$input_text -- " ; find "$input_text" -type f | wc -l ; done < $folderlist
popd &>/dev/null
find "$dirname" -type f >"$temp_file_list"
###-exec echo \"{}\" ';'
-while read line; do
- checker -q -b "$line" 2>&1 >>"$outfile"
+while read input_text; do
+ checker -q -b "$input_text" 2>&1 >>"$outfile"
done <"$temp_file_list"
comm -23 "$here_temp_file" "$there_temp_file" >"$whack_list"
-while read line; do
- if [ -z "$line" ]; then break; fi
- herename="$here/$line"
+while read input_text; do
+ if [ -z "$input_text" ]; then break; fi
+ herename="$here/$input_text"
rm -v "$herename"
done <"$whack_list"
eog "$file"
# now ask the big question: to whack or not to whack?
echo "whack this file? (y/N)"
- read line
+ read inputtext
# a few things mean yes here.
- if [ "$line" == "y" -o "$line" == "Y" -o "$line" == "yes" ]; then
+ if [ "$inputtext" == "y" -o "$inputtext" == "Y" -o "$inputtext" == "yes" ]; then
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
echo "$(date): deleting $file."
perl $FEISTY_MEOW_SCRIPTS/files/safedel.pl "$file"
FILE_LIST=$(find $VOXDIR -type f)
echo "file list is $FILE_LIST"
LINES=$(find $VOXDIR -type f | wc -l)
-#echo "lines is $LINES"
+#echo "info found is: $LINES"
LESS_CHANCE=$(expr $LINES \\* 4)
#echo "less chance is $LESS_CHANCE"
TO_PLAY=
# shows the current processes ordered by cpu usage.
-# generate a nice separator.
-for ((i=0; i<14; i++)); do line+='='; done
-
-echo $line
+sep
echo "Process list by CPU usage for $(date)"
ps wuax --sort -%cpu | head -n 8
-echo $line
+sep
function squash_first_few_crs()
{
i=0
- while read line; do
+ while read input_text; do
i=$((i+1))
if [ $i -le 5 ]; then
- echo -n "$line "
+ echo -n "$input_text "
else
- echo $line
+ echo $input_text
fi
done
if [ $i -le 3 ]; then
for i in $*; do
echo reading $i
- while read line; do
-# echo line is $line
+ while read input_text; do
+# echo input_text is $input_text
csv_split=()
- parse_csv_line "$line"
+ parse_csv_line "$input_text"
if [ ${#csv_split[*]} -lt 1 ]; then
echo did not see any fields in the split array.
+#!/bin/bash
############################################################################
# This function parses a line from a CSV file (you pass the line as the
# argument) into elements in an array. The CSV elements must be enclosed