Question: When I run the following **hasys** command with **awk** , I get output with machines names as the following:

```
hasys -display|grep Shutdown | awk '{print $1}'
  machine1a
  machine1b

```

please advice how to print the machines names in one line as the following: example

```
hasys -display|grep Shutdown | awk '{print $1}'

    machine1a machine1b

```

what I need to add in my awk syntax so I will able to print the names in one line?

Answer: 
You can say:

```
hasys -display | grep Shutdown | awk '{print $1}' ORS=' '

```
```
hasys -display | awk '/Shutdown/ {print $1}' | paste -sd ' ' -

```

Contrary to [@devnull's](https://unix.stackexchange.com/a/115608/22565) and [@jasonwryan's](https://unix.stackexchange.com/a/115610/22565), this one doesn't add a trailing space and terminates the line. `paste -sd*<sep>* -` is the generic idiom to join lines into a `*<sep>*` separated list.