You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get this same error when I run script/package
from the repo root. sed: can't read : No such file or directory
The sed command in the script is : sed -i '' -e"s/google_tracking_id:.*/google_tracking_id:/" _config.yml
The error indicates the sed command is not finding the file _config.yml in the repo root.
This is because of a spurious space character prior to the pair of single quotes placed after the sed -i part of the command. The -i option of sed, enables in-place editing, and it takes an optional argument ( in this case a blank '' string ) ... a suffix with which to create a re-named backup of the file, if so desired. The suffix must directly follow the -i option without any intervening space character. In this case we're quoting a blank, so the first part of the command should be sed -i'', and we won't therefore create a backup file. Actually we didn't need to supply the quoted blank string at all, as I say it's optional, but I'll leave that for someone else to consider.
However, that's not everything, the regular expression supplied to sed (google_tracking_id:.*) is incorrect, as it doesn't match the actual text in the _config.yml file, which is shown here : google: tracking_id : UA-3769691-2
Instead the regular expression to supply is tracking_id\s*:.*
So in total, the final corrected sed command, in script/package should read : sed -i'' -e"s/tracking_id\s*:.*/tracking_id:/" _config.yml
Then the script runs without error, and results in an edited _config.yml file, with the google excerpt like so: google: tracking_id:
I can't vouch that the analytics keywords are still valid 'github yaml' however ...
I'll see if I can create a pull request, it'll be my first, as I'm just learning git (hence I'm exploring training-kit).
Activity
brianamarie commentedon Aug 21, 2017
@ewe2 Thank you for opening this issue. @github/services-training Any volunteers to tackle this?
Chhunneng commentedon Feb 21, 2019
How to change the issue? If I found the issue
brntbeer commentedon Feb 21, 2019
@Chhunneng / @ewe2 I can't actually seem to reproduce this. it may not be relevant anymore.
@Chhunneng can you include a copy of the output that shows this failing?
bazzaar commentedon Mar 30, 2019
I get this same error when I run
script/packagefrom the repo root.
sed: can't read : No such file or directoryThe sed command in the script is :
sed -i '' -e"s/google_tracking_id:.*/google_tracking_id:/" _config.ymlThe error indicates the sed command is not finding the file
_config.ymlin the repo root.This is because of a spurious space character prior to the pair of single quotes placed after the
sed -ipart of the command. The -i option of sed, enables in-place editing, and it takes an optional argument ( in this case a blank '' string ) ... a suffix with which to create a re-named backup of the file, if so desired. The suffix must directly follow the -i option without any intervening space character. In this case we're quoting a blank, so the first part of the command should besed -i'', and we won't therefore create a backup file. Actually we didn't need to supply the quoted blank string at all, as I say it's optional, but I'll leave that for someone else to consider.However, that's not everything, the regular expression supplied to sed (
google_tracking_id:.*) is incorrect, as it doesn't match the actual text in the_config.ymlfile, which is shown here :google:tracking_id : UA-3769691-2Instead the regular expression to supply is
tracking_id\s*:.*So in total, the final corrected sed command, in
script/packageshould read :sed -i'' -e"s/tracking_id\s*:.*/tracking_id:/" _config.ymlThen the script runs without error, and results in an edited
_config.ymlfile, with the google excerpt like so:google:tracking_id:I can't vouch that the analytics keywords are still valid 'github yaml' however ...
I'll see if I can create a pull request, it'll be my first, as I'm just learning git (hence I'm exploring training-kit).
hope this helps,
bazzaar
Corrected the sed -i command in script/package shell script [github#554…
Merge pull request #672 from bazzaar/bazzaar_script_fix
brianamarie commentedon Apr 8, 2019
I'm going to close this issue, as I believe that @bazzaar corrected this with @brntbeer in #672. Please reopen if I'm mistaken. Thank you all!
Corrected the sed -i command in script/package shell script [github#554…