sampleuserhere
Active member
I'm on 5.35.9, and it doesn't look like I could return literal newline with Shell Script action.It's now fixed with the new 5.24.1 version, thanks to @MacroDroidDev.
I'm on 5.35.9, and it doesn't look like I could return literal newline with Shell Script action.It's now fixed with the new 5.24.1 version, thanks to @MacroDroidDev.
What are you trying to do exactly?I'm on 5.35.9, and it doesn't look like I could return literal newline with Shell Script action.
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?What are you trying to do exactly?
0123456
0
1
2
3
4
5
6
As far as I understand you're using a Shell Script action (generating a sequence of numbers?) instead of reading a CSV text file.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).
It's now fixed with the new 5.24.1 version, thanks to @MacroDroidDev.
You're right: as far as I remember MD wasn't dealing right with "\n" new line sequence.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.
I agree with you but to me, with this plain 'cat' command, all lines are concatenated with no LF nor CR.
you are right and it seems to be a peculiarity of MD that strips newlines before storing into a variable
What was the fix you referred to though? That one part confused me.You're right: as far as I remember MD wasn't dealing right with "\n" new line sequence.
It's now fixed with the new 5.24.1 version, thanks to @MacroDroidDev.
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.What was the fix you referred to though? That one part confused me.