Been using UNIX since the late 80s; Linux since the mid-90s; virtualization since the early 2000s and spent the past few years working in the cloud space.
Location
Alexandria, VA, USA
Education
B.S. Psychology from Pennsylvania State University
echo Linux | sed -e 's/L/l/'-e 's/n/N/'-e 's/l/L/' -e 's/x/X/'
Which, to me, is more readable than having everything all bunched up and lends itself to uniform line-breaking in a long, complex script. Similarly, if you go this route, you also improve readability while retaining the "single invocation" efficiencies.
echo Linux | sed '{
s/L/l/
s/n/N/
s/l/L/
s/x/X/
}
...Though, if you're transforming the "L" to an "l" and then back to an "L", efficiency likely isn't your goal.
Whether using multiple, discreet sed invocations or a single, multi-transform sed, always remember that "order counts".
Similarly, have single-invocation choices like:
Which, to me, is more readable than having everything all bunched up and lends itself to uniform line-breaking in a long, complex script. Similarly, if you go this route, you also improve readability while retaining the "single invocation" efficiencies.
...Though, if you're transforming the "L" to an "l" and then back to an "L", efficiency likely isn't your goal.
Whether using multiple, discreet sed invocations or a single, multi-transform sed, always remember that "order counts".
intention was just to demonstrate piping :)