I can't import your task for some reason. It says "done" but doesn't
show up anywhere. I tried importing an existing task of my own and it
says "a task with that name already exists" but every time I try yours
it says "Done." so apparently yours isn't really importing. Maybe
because I'm on 2.3? The version shouldn't matter to sed though, it's a
very basic linux command that probably hasn't changed in years.
Anyway, if you can import mine, try this:
http://www.gogofile.com/Default.aspx?p=sc&ID=634360007641578750_2758
or here it is manually:
1- variable set %ONE to 1 (used to read only line 1 from the file,
otherwise it gets an EOF error every other time you run it. That's
just the way tasker is when reading files sometimes)
2- variable set %LETTERS to abc
3- write file test.txt %LETTERS
4- execute @ sed -i 's/./& /g' /sdcard/test.txt
5- read line file:test.txt line:%ONE to var %LINE
6- flash %LINE (it should flash "a b c")
7- variable split %LINE using a space as the splitter
8 - flash:
line1: %LINE1
line2: %LINE2
line3: %LINE3
If the split works, step 8 should flash:
line1: a
line2: b
line3: c
Step 7 may be giving a problem. When I add a space then go back to
edit that step, the space is gone. The task actually still works for
me though. Maybe it isn't meant to use spaces or maybe it will use a
space as default if you add nothing, but what I originally did was add
a space as the splitter, clicked done, and it worked. You could always
change the sed command to use something other than spaces, like 's/./
&Z/g' will make "abc" change to "aZbZcZ" then you could use Z as the
splitter.
Hope some of this helps.
(And luckily only one of the kids was mine, but she never settles!)
On Mar 17, 7:36 pm, BossMan <
adam.marynow...@gmail.com> wrote:
> Small clarification about /g - as far as I remember, it means
> "globally",
D'oh. I thought and thought and couldn't come up with anything the g
could possibly stand for. I blame it on PERL users who often use s///
as the default example although I bet they, like me, never use it
without the g.