Add to Paper in Bash

What other productivity software are you working with...
Post Reply
jdev21
Posts: 45
Joined: 08 Oct 2014 22:13

Add to Paper in Bash

Post by jdev21 » 27 Jun 2018 05:25

I have been having some trouble appending a directory to a txt paper folder in bash.
I have found that I need to use iconv to convert the text to utf16 to even get it to appear properly in the text file (perhaps this is still the cause).
I'm using this command:

Code: Select all

echo -e "\nT:\OhHello" | iconv -f ascii -t utf16 >> /mnt/Paper/X.txt
This will add the new line to the paper folder but when I open XY, the folder does not appear and when I exit, it erases it from the text file.
The folder exists on T:\ (if I edit the paper folder manually it works).

Any ideas?

jdev21
Posts: 45
Joined: 08 Oct 2014 22:13

Re: Add to Paper in Bash

Post by jdev21 » 27 Jun 2018 05:53

I found an answer. If anyone stumbles on this --
The paper .txt files also use CRLF line terminators which need to be added to the bash command with \r as follows:

Code: Select all

echo -e "\r\nT:\OhHello\r" | iconv -f ascii -t utf16 >> /mnt/Paper/X.txt

Post Reply