I'm trying to simplify this sed expression as I think it is not the best way to represent what is going on. I have a sample shell script:
Is there a way to do this with a single sed expression, 1 -e?
So, line 2 shall become:
And, the others shall remain as they were.
#!/bin/sh
lib include.sh
lib git:install/git.sh
lib git:git/include.sh
_git_init
cat /tmp/sample.sh | sed -e 's/^lib /lib git:install\//' -e 's/^lib git:install\/git:/lib git:/'
Is there a way to do this with a single sed expression, 1 -e?
So, line 2 shall become:
lib git:install/include.sh
And, the others shall remain as they were.