Pasting shell commands can be a pain when they include hidden return \n
characters. In
such a case, your shell will try to execute the command immediately. To prevent that, use
curly braces { <cmd> }
while pasting the command. Your command should look like the
following:
{ dig +short google.com }
Here, the spaces after the braces are significant.
— ⁂ —
Recent posts
- Deferred teardown closure in Go testing
- Three flavors of sorting Go slices
- Nil comparisons and Go interface
- Stacked middleware vs embedded delegation in Go
- Why does Go's io.Reader have such a weird signature?
- Go slice gotchas
- The domain knowledge dilemma
- Hierarchical rate limiting with Redis sorted sets
- Dynamic shell variables
- Link blog in a static site