Question: UNIX, URGENT, Short problem How do i change this grep command to send the header layout to either project3.df.output or project3.ui.output would you just change
UNIX, URGENT, Short problem
How do i change this grep command to send the header layout to either project3.df.output or project3.ui.output would you just change the "24" in the grep line to "df"? and would the out_file=project3\.df\.output
if [ `echo $1 | grep -c "24" ` -gt 0 ] #check if command line argument contains 24 or not
then
out_file=project2\.24\.out #set the out file to project2.24.out
else
out_file=project2\.12\.out #set the out file to project2.12.out
fi
echo "**************">$out_file #write the line to file in write mode so that file would get created or replaced
echo "">>$out_file #write the line to file in append more so that the line gets added in end of the file
echo "Student name : ">>$out_file #write the line to file in append more so that the line gets added in end of the file
echo "Project 2 CIS 129 Sec #">>$out_file #write the line to file in append more so that the line gets added in end of the file
echo $current_time>>$out_file #write the line to file in append more so that the line gets added in end of the file
echo "**************">$out_file #write the line to file in write mode so that file would get created or replaced
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
