Skip to content

Instantly share code, notes, and snippets.

@wwalker
Created April 3, 2021 02:33
Show Gist options
  • Save wwalker/629fa8f5f72986fd7fbdd7496480e6eb to your computer and use it in GitHub Desktop.
Save wwalker/629fa8f5f72986fd7fbdd7496480e6eb to your computer and use it in GitHub Desktop.
#!/bin/bash
for file in $BLKPATH/*;
do
echo $file
if [[ $file =~ $BLKPATH/blk[0-9][0-9][0-9][0-9][0-9].dat ]]; then
printf "got a match - %s\n"
BLKLST+="-$OPTION=$file "
fi
done
echo $BLKLST
249750 2021-04-02 21:27:46 - BLKPATH=/home/helloshitty/WdElements/blockchain-backup/blocks
249751 2021-04-02 21:28:00 - sudo mkdir -p $BLKPATH
249752 2021-04-02 21:28:53 - sudo touch $BLKPATH/blk01516.dat $BLKPATH/blk0A1516.dat
249755 2021-04-02 21:31:07 - BLKPATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment