CTRL+D == exit shell command
и
CTRL+C == terminate the current process, Of course may be the given software handle it and
CTRL+D doens't work
Конечно, Они производят a kernel signal
если Вы хотите знать больше, читайте:
man 7 signal
здесь немного неуклюжий способ запустить этот поток
% x="something@test.com:blah:blah"
% first=$(echo $x|cut -d "@" -f 1)
% second=$(echo $x|cut -d "@" -f 2|cut -d ":" -f 1)
% echo "$x:$first:$second"
something@test.com:blah:blah:something:test.com
$ echo 'something@test.com:blah:blah' |
perl -lne '
@F = split /(\@|\.|:)/, $_;
print "$_:$F[0]:$F[2].$F[4]."
'
something@test.com:blah:blah:something:test.com.