I agree with you but to me, with this plain 'cat' command, all lines are concatenated with no LF nor CR. I have to add the '-e' option (cat -e file_name) to generate a $ symbol between every line and then to replace every $ symbol by '\n'. Which is a poor workaround because you can't have any $ symbol in your input file.You can get raw data of csv file using shell action and saving output into string.
Bash:cat /storage/emulated/0/file.csv
Thanks a lot for your suggestion. I'm not familiar at all with shell script so I'm sure it'll help.you are right and it seems to be a peculiarity of MD that strips newlines before storing into a variable
I guess we could ask @MacroDroidDev to fix this
however there is another workaround
assume that a character does not exist in your text, eg. ':'
then do
cat file | tr '\n' ':'
action text, replace all : with \n
if it's difficult to find a character that does not exist in your text
then there is another workaround using the sed command to replace newline with a string like EOL or a-dummy-string or whatever you like
Thanks a lot. Let me try it!it would be
cat file | sed -z 's/\n/EOL/g'
Unfortunately '-z' option doesn't work/doesn't exist.it would be
cat file | sed -z 's/\n/EOL/g'
Thanks again for your reply.it's strange !! , -z works for me
perhaps device is old ? or the manufacturer has really killed the original Android code/setup
what device and Android you use ?
good you have a solution
even without -z there are other sed commands that can do the same thing and should work for you though they are more complicated
Which one are you using?5.23.7 ..................
I don't think it's a beta one.5.22.6
in a few days it's exactly 2 months without any update
Beta has become the normal..
I will complain loudly .. this is ridiculous
I don't knowhow can this be possible ??
it's not available on play store (only beta is available)
It's now fixed with the new 5.24.1 version, thanks to @MacroDroidDev.you are right and it seems to be a peculiarity of MD that strips newlines before storing into a variable
I guess we could ask @MacroDroidDev to fix this
however there is another workaround
assume that a character does not exist in your text, eg. ':'
then do
cat file | tr '\n' ':'
action text, replace all : with \n
if it's difficult to find a character that does not exist in your text
then there is another workaround using the sed command to replace newline with a string like EOL or a-dummy-string or whatever you like