• Wincent
    Open
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search

Using Perl as a stream editor on standard inputEdit

Created 4/3/2007, updated 5/18/2017

Removing spaces from the standard input, echoing to standard output

echo -n "foo bar baz bing bong boom" | perl -pe "s/ //g"

Output

foobarbazbingbongboom

Related

  • Using Perl to filter standard input
  • perl.one.liners
  • wiki
Site
  • About
  • Blog
  • Wiki
  • Snippets
  • Tags
  • Search
External
  • GitHub
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
Colophon

Made by Greg Hurrell using React, Relay and GraphQL (with help from Git, Redis and Neovim).