Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

wget files matching regex

# Getting http://some/site/*my_pattern*
SITE="http://some/site/"
PATTERN="my_pattern"
wget -nv -O- $SITE | 
  grep $PATTERN | 
    awk -v pat=$PATTERN -F '"' '{ for (i=1; i<=NF; ++i) { if ($i ~ pat) print $i } }' |
      while read x; do 
      	if [[ ! $x = ">" ]] ; then
      	  wget $SITE$x &>/dev/null
      	  echo $x
      	fi
Comment

PREVIOUS NEXT
Code Example
Shell :: copy to clipboard in gihub readme 
Shell :: netcdf4 install conda 
Shell :: how to make a beep in cmd 
Shell :: linux append group 
Shell :: start apache service 
Shell :: install pip 
Shell :: git clean 
Shell :: store ls into array bash 
Shell :: Unable to init server: Could not connect: Connection refused 
Shell :: zsh get current theme 
Shell :: Disable MacBook from Booting Automatically 
Shell :: search not working windows 11 
Shell :: reset one branch onto another 
Shell :: change date linux 
Shell :: git delete pushed commit 
Shell :: what shell type 
Shell :: pip install quiet 
Shell :: git push heroku master 
Shell :: git command line see logö 
Shell :: What should you run to modify your last commit? 
Shell :: brew install pgdump 
Shell :: arch linux 
Shell :: install babel 
Shell :: git remove last commit origin 
Shell :: How do I hide the path in command line prompt on Windows? 
Shell :: echo or cat into multiple files 
Shell :: how to open pdf from ubuntu terminal 
Shell :: kill port from terminal on mac 
Shell :: apt remove 
Shell :: kali linux ipsweep zsh permission denied 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =