start, stop: avoid null list in concatenation witout arguments, use $user

This commit is contained in:
cinap_lenrek 2020-12-23 01:41:52 +01:00
parent c7fd8fe47a
commit c8c5499d7f
2 changed files with 2 additions and 4 deletions

View file

@ -1,5 +1,4 @@
#!/bin/rc
U=`{cat /dev/user}
ps | sed -n '/^'$U' .*Stopped.* '$1'$/s%[^ ]* *%~>/proc/%
~ $#* 0 || ps | sed -n '/^'$user' .*Stopped.* '$1'$/s%[^ ]* *%~>/proc/%
s% *.*%/ctl%
s%~%echo start%p'

View file

@ -1,5 +1,4 @@
#!/bin/rc
U=`{cat /dev/user}
ps | sed -n '/^'$U' .* '$1'$/s%[^ ]* *%~>/proc/%
~ $#* 0 || ps | sed -n '/^'$user' .* '$1'$/s%[^ ]* *%~>/proc/%
s% *.*%/ctl%
s%~%echo stop%p'