osx - Mac Terminal, find and replace spaces command -


i'm writting list of commands within atom plugin, 1 of commands changes terminals working directory.

however issue if there space within url not work, gets directory location current working path, can't slash spaces manually.

you can set variables within terminal, there way replace spaces , slash them within terminal command?

** edit: ** following error code:

the files /users/imac/dropbox/_themev2-folder-1157, /users/imac/we, /users/imac/finance, /users/imac/poor, , /users/imac/credit not exist.

this code, %(project.root) get's replaced project file path.

"command": [   "pkill -9 gulp",   "echo 'quit: gulp process terminated!'",   "echo 'start: new gulp process started, please wait...'",   "open %(project.root)",   "cd \"%(project.root)\"",   "gulp" ] 

** edit 2 ** quotes work now. please add answer.

as alternative backslash escaping troublesome characters (such spaces) can enclose entire path/parameter in double quotes, might use:

somecmd "/path space/file space.txt" 

rather than

somecmd /path\ with\ space/file\ with\ space.txt 

Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -