From ade3aac25817faf543df78fbf93064ed500a535e Mon Sep 17 00:00:00 2001 From: cstackpole Date: Sat, 19 Jul 2014 10:45:51 -0700 Subject: [PATCH] Making the code line look nicer. --- SC2001.md | 1 + 1 file changed, 1 insertion(+) diff --git a/SC2001.md b/SC2001.md index a9bfd84..4c0df3c 100644 --- a/SC2001.md +++ b/SC2001.md @@ -15,6 +15,7 @@ Let's assume somewhere earlier in your code you have put data into a variable (E ### Contraindications Occasionally a more complex sed substitution is required. For example, getting the last character of a string. + string="stirng" ; echo "$string" | sed -e "s/^.*\(.\)$/\1/" This is a bit simple for the example and there are alternative ways of doing this in the shell, but this SC2001 flags on several of my crazy complex sed commands which are beyond the scope of this example. Utilizing some of the more complex capabilities of sed is required occasionally and it is safe to ignore SC2001.