Source Code of the original script is down below please run the script and try to solve this problem
this is my data and I want it column wise
2019-03-20 13:00:00:000
2019-03-20 15:00:00:000
1
Operating System
LAB
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
Source Code of the original script is down below please run the script and try to solve this problem
this is my data and I want it column wise
2019-03-20 13:00:00:000
2019-03-20 15:00:00:000
1
Operating System
LAB
0
1
1
1
1
1
1
1
1
1
0
1
1
1
1
1
1
Provide required input and output to help you
What do you mean by "column wise"? As far as I can see, there is just one column?
Is that something like below command you are expecting ?
tr ' ' '\n' < File.txt
Dear Team, now i hope you will understand my problem!
#!/bin/bash
date()
{
echo "Please Enter Hours And Minites"
echo "Enter Hours:"
read hrs
echo "Enter Minites:"
read min
DATE=$( zenity --calendar --date-format='%Y-%m-%d '$hrs':'$min':00:000' --display=:0 )
}
session_number()
{
echo "Please select Session Number:"
session_option=("1" "2" "3" "4")
select session_option in "${session_option[@]}" "EXIT"; do
if [[ "$REPLY" -ge 5 ]]; then
echo "Good Bye"
exit 1
fi
echo "-------------------------------------------------------------------"
return
done
}
subjects()
{
subject_options=("Advanced .Net"
"Advanced Analytics"
"Advanced Java"
"Android"
"Application Security & Testing"
"Aptitude Skills"
"Asp.Net"
"Big Data Technologies"
"C Programming"
"C#"
"Cloud Computing and HPC"
"Computer Awareness"
"Computer Fundamentals"
"Core Java"
"Cpp"
"Data Structures"
"Data Visualization"
"DBT"
"Effective Communication Skills"
"HTML"
"Java Script"
"JavaScript Framework"
"Linux"
"MDP"
"Mock Examination"
"Networking"
"Operating System"
"PHP"
"Practical Machine Learning"
"Project"
"Python programming"
"R Programming"
"Software Engineering"
"Software Testing"
"Test"
"Upcoming Technologies"
"Web Development"
"XML")
select subject_options in "${subject_options[@]}" "EXIT"; do
if [[ "$REPLY" -ge 39 ]]; then
echo "Good Bye"
exit 1
fi
#echo "You picked $options which is options $REPLY"
echo "-------------------------------------------------------------------"
break
done
}
task()
{
task_option=("THEORY" "LAB")
select task_option in "${task_option[@]}" "EXIT"; do
if [[ "$REPLY" -ge 3 ]]; then
echo "Good Bye"
exit 1
fi
#echo "You picked $options which is options $REPLY"
echo "-------------------------------------------------------------------"
break
done
}
present()
{
make_one()
{
for (( i=0;i<94;i++ )); do # Total 94 studence are there!
echo "1" >> data.txt #making all one & storing data into file
done
}
make_one
echo "Please Enter Absent Students PRN Numbers:"
read line
read -r -a array <<< "$line"
for element in "${array[@]}"
do
sed -i $element's/1/0/' data.txt #replacing absent number by zero
done
}
date
echo "$DATE" >> data-attendence.txt
date
echo "$DATE" >> data-attendence.txt
session_number
echo "$session_option" >> data-attendence.txt
subjects
echo "$subject_options" >> data-attendence.txt
task
echo "$task_option" >> data-attendence.txt
present
cat data.txt >> data-attendence.txt
rm -rf data.txt
awk '{ print $0 }' data-attendence.txt >> output.xlsx ############### at this Line change is required
sleep 10
#rm -rf data-attendence.txt
exit 1
This is my Script which I make for calculating attendance of students. which gives me output.xlsx file, in this file, I am expecting Column wise output but, I get output in one column only so Please help me to solve this problem.
Please read, understand, heed, and answer posts carefully.
Again: What do you mean by "column wise"
Is it that you want ALL output thuis far to be in one row, separated by a field separator like comma, or <TAB>? Are you aware that this won't have .xlsx
structure?