All Go Rust Python PHP JavaScript
Chrome Dev Summit to secure your spot in workshops, office hours and learning lounges!

How to Pipe Several Commands in Go

In Golang, there are 2 ways to pipe several commands. Using piped commands For example, this function retrieves the CPU model name using piped commands: package main import ( "fmt" "os/exec" ) func main() { cmd := "cat /proc/cpuinfo | eg...
Patcher56

How to use the history command in Linux

history command is used to view the previously executed command. The history command works with the command history list. When the command is issued with no options, it prints the history list. The History library provides a history expansion featur...

How to use the grep command in Linux

Search for PATTERN in each FILE or standard input. grep is a command-line utility for searching plain-text data sets for lines that match a regular expression. Its name comes from the ed command g/re/p (globally search for a regular expression and p...

How to use the alias command in Linux

Alias command instructs the shell to replace one string with another string while executing the commands. The alias command lets you give your own name to a command or sequence of commands. You can then type your short name, and the shell will execu...

How to use the Docker-compose exec command line

Execute a command in a running container.With this subcommand you can run arbitrary commands in your services. Commands are by default allocating a TTY, so you can use a command such as docker-compose exec web sh to get an interactive prompt. ...