Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Whatever
how to print substring in bash script
salman
Programming language:
Whatever
2021-07-03 10:06:18
0
Q:
how to print substring in bash script
Antonio Brandao
Code:
Whatever
2021-08-27 16:55:30
INPUT='someletters_12345_moreleters.ext' SUBSTRING=$(echo $INPUT| cut -d'_' -f 2) echo $SUBSTRING
0
Tags
string
int
sub
how
script
print
Related
print statement in bashrc
bash replace substring
bash substring test
New to Communities?
Join the community