Skip to content

Instantly share code, notes, and snippets.

Created October 19, 2014 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/90827eb9f781e430ee7c to your computer and use it in GitHub Desktop.
Save anonymous/90827eb9f781e430ee7c to your computer and use it in GitHub Desktop.
# Try the command with --prompt to confirm syntax
me@host:~$ find dir -name '*.less' | sed 's/^\(\(.*\).less\)$/\1 > \2.css/' | xargs -p -n 3 lessc
lessc dir/styles.less > dir/styles.css ?...
lessc dir/test.less > dir/test.css ?...
lessc ?...
# Does not create file
me@host:~$ ls dir/styles.css
ls: cannot access cg/app/evaluator/styles.css: No such file or directory
# Copy paste the exact syntax from xargs above
me@host:~$ lessc dir/styles.less > dir/styles.css
# And it works?
me@host:~$ ls dir/styles.css
dir/styles.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment