I want to get the file name from different server and store it in a variable.
example: from 1 server I want to get the file name using below command
FILE_NAME=$(ssh user@host ls /acd/file/zipped/processing/trigger/Daily_trigger_$DATE*.csv*)
but FILE_NAME
stores complete path and filename:
/acd/file/zipped/processing/trigger/Daily_trigger_19072021_220305.csv
I only want the filename.