sed: no files given
See original GitHub issuecan’t npm run resolvevue
package.json:
"scripts": {
...
"resolvevue": "shx sed -i \"s/'vue'/'https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.esm.browser.js'/g\" dist/*.js"
}
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to use SED without a file with an env var? - Stack Overflow
I needed to do replacement without echoing (use in PS1 variable). this was helpful to me. – astreal. Feb 17, 2013 at 11:45...
Read more >Passing regular files only to `sed -i` - Unix & Linux Stack ...
Is there a way to have sed ignore errors and continue processing files? Case 3. for file in $(find . -maxdepth 1 -type...
Read more >sed: can't read : No such file or directory - Super User
In your case, you have the file /tmp/tmp.Q18p8BRYcc/steam engine.txt that contains a space and that breaks your command. Please consider using ...
Read more >In-place file editing - GNU SED - learnbyexample
This chapter will discuss how to write back the changes to the input file(s) itself using the -i command line option. This option...
Read more >Linux sed command help and examples - Computer Hope
(Note that sed counts lines continuously across all input files unless -i or -s ... If no addresses are given, then all lines...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I think you need to escape the
/
characters in your replacement string, otherwisesed
treats them as special delimiters. This behavior is consistent with unix sed:You should escape the characters with a "" in the commandline like so:
To use this in a
package.json
, you need double\
so JSON passes a single\
ontoshx
:Yes! This (in package.json) works:
@nfischer Please, add this to documentation.