Bash: Grab part of string from a command line output
问题 I am running a command in CentOS that gives me an output of a string and I want to grab a certain part of that output and set it to a variable. I run the command ebi-describe-env. My output as follows: ApplicationName | CNAME | DATECreated | DateUpdated | Description | EndpointURL | EnvironmentID | EnvironmentName | Health | Stack | Status | TemplateName | Version Label -------------------------- Web App | domain.com | 2012-02-23 | 2012-08-31 | | anotherdomain.com | e-8sgkf3eqbj | Web-App