1 forum post by user DvdGiessen
Post: .read command breaks on reading from named pipes
(artifact: 6228f24c14 user: DvdGiessen)
In check-in 6d258c3c7ecafa11 the ".read" command added a check to not error on directories, by checking if the file is a regular file.
However, there are other types of files one might want to read, for example a named pipe.
Use case for this is generating SQL on the fly and piping it to the sqlite
executable. It is a bit more flexible compared to the
Run with for example bash or any other shell that supports process substitution.
On older versions, this would correctly print
Suggested fix would be to replace the
(Perhaps other people have use cases for even more unsual types such as character devices? Transmitting SQL commands straight over a serial port into sqlite seems funky, but I guess in good Unix tradition we should give people the freedom to shoot themselves in the foot. :) )