我需要在shell脚本中的最后一个下划线之前提取值.
例:
Input: first_second_third_mmddyyy.csv Output: first_second_third Input: first_second_mmddyy.csv Output: first_second
unix linux shell
linux ×1
shell ×1
unix ×1