Deliver mail to local alias ops to both local users alice and bob.
Which /etc/aliases line is appropriate?
Use a comma-separated recipient list on the right side of one alias.
Detailed explanation
ops: alice, bobCorrect. ops expands to both recipients.
Correct. ops expands to both recipients.
ops: alice | bobIncorrect. A pipe has a different program-delivery meaning.
Incorrect. A pipe has a different program-delivery meaning.
alice, bob: opsIncorrect. The alias and recipient sides are reversed.
Incorrect. The alias and recipient sides are reversed.
ops = alice bobIncorrect. It is not aliases-file colon/comma syntax.
Incorrect. It is not aliases-file colon/comma syntax.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'ops: alice, bob' | awk -F': *' '{gsub(/, */, "
", $2); print $2}'Expected result
alice
bobKey points
- Comma separates recipients
- One alias on left
- Rebuild database afterward
Notes
- Environment: awk / 合成aliases行
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.