Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Code So far: today=\'date\' now=time echo \'enter input\' scanf input if (input=

ID: 644135 • Letter: C

Question

Code So far:

today='date'

now=time

echo 'enter input'

scanf input

if (input='Date')

then

echo $today

else

echo $now

fi

1. Bash Program Please help (Extra 600 pts for best solution)(No one answered) Write bash (shell) programs that make use of the following features. Linux commands reading user input accessing system information such as date, time, file number, size, and names arithmetic comparisons . if statements for var in list output commands Code So far: today='date' now=time echo 'enter input' scanf input if (input='Date') then echo $today else echo $now fi

Explanation / Answer

now="$(date)" printf "Current date and time %s " "$now" now="$(date +'%d/%m/%Y')" printf "Current date in dd/mm/yyyy format %s " "$now" echo "Starting backup at $now, please wait..."