I'm writing a program which now accepts user input:
Code:
echo "Enter a date in the format YYYY MM DD hh mm ss."
read gregyr gregmo gregdy greghr gregmn gregsc
This lets the user input a date and time, such as 2011 06 21 15 12 45, and have each number assigned to their corresponding variable. Later in the program, these variables are put into an equation, and then the terminal spits out the answer.
Now I have to have the program read all of the lines from a text file, which is in this format, assign the variables, solve the equations, and put the solutions into a new file. I haven't been using bash for very long; any help would be appreciated.