I'm trying to do something like this:
\begin{longtable}{| c | l |}
\hline \textbf{Short name }& \textbf{Description} \\
%assume all lines in the text are '\hline <name> & description \\'
\input{logs/some_entries.txt}
\input{logs/other_entries.txt}
%[...]
\hline
\end{longtable}
Where the text files are bash-generated.
If I copy-paste the input of the text files, the pdf is built correctly. Trying to use the files like this, though, will result in
! Misplaced \noalign.\hline ->\noalign{\ifnum 0=`}\fi \penalty \@M \futurelet \@let@token \LT@@h... \hline
How do I make this work?
EDIT
Minimal "working" example:
\documentclass[11pt]{article}
\usepackage[a4paper, portrait, margin=1in]{geometry}
\usepackage{hyperref}
\usepackage{color, colortbl}
\usepackage{longtable}
\begin{document}
\begin{longtable}{| c | l |}
\hline \textbf{Short name }& \textbf{Location} \\
\hline Google & \url{https://google.com} \\
\input{some_entries.txt}
\hline
\end{longtable}
\end{document}
where some_entries.txt
contains
\hline TEX & \url{http://tex.stackexchange.com}\\%
Best Answer
This works for me:
test01.txt:
test02.txt: