Skip to content

Latest commit

 

History

History
23 lines (14 loc) · 386 Bytes

SC2001.md

File metadata and controls

23 lines (14 loc) · 386 Bytes

Pattern: Use of sed -e

Issue: -

Description

See if you can use ${variable//search/replace} instead.

Example of incorrect code:

string="stirng" ; echo "$string" | sed -e "s/ir/ri/"

Example of correct code:

string="stirng" ; echo "${string//ir/ri}"

Further Reading