Csv file reader

sampleuserhere

Active member
What are you trying to do exactly?
Confirming whether your reply below is true or not. I assumed that you said that Macrodroid returned newlines normally since that version. Or perhaps I got what you had said wrong?

Post in thread 'Csv file reader' http://www.macrodroidforum.com/index.php?threads/csv-file-reader.2208/post-13335

I tried running `seq 0 6` with Shell Script action and it still didn't return the new line. It still returned

Code:
0123456

Instead of.

Code:
0
1
2
3
4
5
6

I still have to replace "\n" first with other characters if I want to keep the newlines.
 

Dm114

Well-known member
Confirming whether your reply below is true or not. I assumed that you said that Macrodroid returned newlines normally since that version. Or perhaps I got what you had said wrong?

Post in thread 'Csv file reader' http://www.macrodroidforum.com/index.php?threads/csv-file-reader.2208/post-13335

I tried running `seq 0 6` with Shell Script action and it still didn't return the new line. It still returned

Code:
0123456

Instead of.

Code:
0
1
2
3
4
5
6

I still have to replace "\n" first with other characters if I want to keep the newlines.
As far as I understand you're using a Shell Script action (generating a sequence of numbers?) instead of reading a CSV text file.

As I don't know the shell script command you're using, I would suggest to check if it's possible to add a separator between each generated number (or generate the sequence to a file and then read the file -it works quite well with new lines).
 

sampleuserhere

Active member
As far as I understand you're using a Shell Script action (generating a sequence of numbers?) instead of reading a CSV text file.

As I don't know the shell script command you're using, I would suggest to check if it's possible to add a separator between each generated number (or generate the sequence to a file and then read the file -it works quite well with new lines).

Hmm, I got that part taken care of. This seems like it'll take a weird turn.

Actually, I was just curious at the part where you said something was fixed in your reply I linked earlier.

This one right below.
It's now fixed with the new 5.24.1 version, thanks to @MacroDroidDev. ๐Ÿ‘๐Ÿ™

Do you remember what was fixed here?

I thought it was related to the newlines issue since you quoted the other user who mentioned that MD stripped newlines before storing into variable.
 

Dm114

Well-known member
Hmm, I got that part taken care of. This seems like it'll take a weird turn.

Actually, I was just curious at the part where you said something was fixed in your reply I linked earlier.

This one right below.


Do you remember what was fixed here?

I thought it was related to the newlines issue since you quoted the other user who mentioned that MD stripped newlines before storing into variable.
You're right: as far as I remember MD wasn't dealing right with "\n" new line sequence.
 

Dm114

Well-known member
What was the fix you referred to though? That one part confused me.
I don't remember exactly what was the fix but what I know is that it's now possible to read a text/CSV file to a string variable (with newline after each record) and then Split it to an array with \n delimiter.
 

Endercraft

Moderator (& bug finder :D)
Looks like MD still can't return newlines properly..b
I have to use Termux or use tr to replace \n with some other character.
 
Top