DASH Shell discussions
 help / color / mirror / Atom feed
* sed script fails to run in dash
@ 2013-11-22 18:11 Tormen
  2013-11-22 19:20 ` Seb
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Tormen @ 2013-11-22 18:11 UTC (permalink / raw)
  To: dash

Hi,

I am puzzled and don't know why this command does not work with dash (I
am currently using the debian stable (v7.2) version of dash (v0.5.7-3)):

echo 1>/tmp/x; reponse=$( sed -e $(wc -l </tmp/x)$'{w/dev/stdout\n;d}'
-i /tmp/x ); echo "reponse='$reponse'"

but also just this line:

    sed -e 1$'{w/dev/stdout\n;d}' -i /tmp/x

in a dash script will yield the error message:

    sed: -e expression #1, char 2: unknown command: `$'

But why ? :(

I would be really grateful for any explanation.
Thanks a lot in advance for any hint!


Tormen


P.S.: The source for the above line is:
http://stackoverflow.com/questions/13804967/bash-pop-lines-in-a-file

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-11-23  0:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-22 18:11 sed script fails to run in dash Tormen
2013-11-22 19:20 ` Seb
2013-11-22 19:25 ` Jonathan Nieder
2013-11-22 19:26 ` Eric Blake
2013-11-23  0:14   ` Tormen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox