My file name is Oracle.2347263_testing_152607.csv
I tried this :
echo Oracle.2347263_testing_152607.csv | sed -e 's/.*G.//' \-e 's/.csv//'
but I didn't get the result I expected.
I want to extract 2347263
from Oracle.2347263_testing_152607.csv
please help
awk -F'[._]' '{print $2}'
– jasonwryan Feb 2 '15 at 23:43grep -o "\b[0-9]\+"
– Costas Feb 3 '15 at 0:13i=Oracle.2347263_testing_152607.csv
and thenj=${i#Oracle.*} ; echo ${j%%_*}
. – ott-- Feb 3 '15 at 23:06