[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
e, r and w cannot be followed by semicolons as well
From: |
Arkadiusz Drabczyk |
Subject: |
e, r and w cannot be followed by semicolons as well |
Date: |
Tue, 21 Jan 2025 18:04:05 +0100 |
In doc/sed.texi it says:
> Commands @command{a}, @command{c}, @command{i}, due to their syntax,
> cannot be followed by semicolons working as command separators and
> thus should be terminated with newlines or be placed at the end of a
> @var{script} or @var{script-file}.
Should e, r and w be mentioned here as well? They cannot be followed
by a semicolon:
$ seq 1 10 | sed '10 e date; 1 s/1/-1/'
1
2
3
4
5
6
7
8
9
sh: line 1: 1: command not found
Tue Jan 21 17:44:01 CET 2025
$ seq 1 10 | sed '10 r /proc/version; 1 s/1/-1/'
1
2
3
4
5
6
7
8
9
10
$ seq 1 10 | sed '10 w HERE; 1 s/1/-1/'
sed: couldn't open file HERE; 1 s/1/-1/: No such file or directory
--
Arkadiusz Drabczyk <arkadiusz@drabczyk.org>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- e, r and w cannot be followed by semicolons as well,
Arkadiusz Drabczyk <=