Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

regex in shell script

# command Specific 
$ ls *
$ cp [a-z]* dest_dir/
$ cp [!a-z]* dest_dir/

# Grep
$ grep '^[h-k]' log.txt 
$ grep e$ log.txt #line end with 'e'
$ grep ^http log.txt #line begin with http

 
PREVIOUS NEXT
Tagged: #regex #shell #script
ADD COMMENT
Topic
Name
6+9 =