This is my Linux script, I want to ask the user from outside what date is needed, then save that date and run the script for that date.
#/bin/bash cDt=$(date +"%Y%m%d") cd /home/dwh_landing/temp echo 'Process_Date,Outfile,Outpath,Process_hour,Process_Minutes,Infile' > ccn_daily_${cDt}.csv cd /home/dwh_landing/etl_scripts/etl_logs/ awk -F',' '{print $1 "," $2 "," $5}' *ccn-json*${cDt}* | grep 'creditControl.json' | awk -F '/' '{print $0 "," $5}' | awk 'match($0, /(\s\S*k)/ , a ) {print $0 "," a[1]}' >> /home/dwh_landing/temp/ccn_daily_${cDt}.csv cd /home/dwh_landing/temp cat ccn_daily_${cDt}.csv | wc -l >> ccn_daily_${cDt}.csv now currently this script generate a csv for the current date files, I want to run this for a user request date, can I pass parameters from outside? any help could be useful.