Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to print substring in bash script

INPUT='someletters_12345_moreleters.ext'
SUBSTRING=$(echo $INPUT| cut -d'_' -f 2)
echo $SUBSTRING
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #print #substring #bash #script
ADD COMMENT
Topic
Name
7+7 =