Hello,
I would like to cut the first field and the 2 last fields from the string.Please help.
Here is the example of the string.
DL_FUND_FULL_20190605.txt
DL_FUND_HIS_DEL_20190605.txt
DL_FUND_HIS_TMP_DEL20190605.txt
Please noted that
DL_
--> Every files have the prefix like this.
FULL_YYYYMMDD,DEL_YYYYMMDD
--> There are 2 types of the suffix files like this.
The rest in the centre is Table names which cannot define how many character they have
FUND,FUND_HIS,FUND_HIS_TMP
I would like to get the name of table thus I use this command
echo "DSL_EDUCATE_LEVEL_FULL_20190605.ctl" | rev | cut -d "_" -f3- | rev
The answer for each line are:
DL_FUND
DL_FUND_HIS
DL_FUND_HIS_TMP
However, I cannot figure out how to cut DL_ into that command. The result that I would like to have are
FUND
FUND_HIS
FUND_HIS_TMP