Hi all
How to cut words before the first “END” word in line, and not include the first character before the “END” word ( in our examples the character is “-“)
Only with sed command
For example:
echo AAA-BBB-CCC-END | sed ...
AAA-BBB-CCC
echo 1-END-3-4 | sed ...
1
echo 1-2-END-3-4 | sed ...
1-2
echo PARAM1-PARAM2-END | sed ...
PARAM1-PARAM2
echo fileExample1-fileExample2-END | sed ...
fileExample1-fileExample2
echo xyz_123-END | sed ...
xyz_123