Artificial intelligent assistant

awk or sed, move first column to end? I have a text file separated by space as follows. I need to re-arrange the columns so that the first column is at the end of each line. I have an idea of how this could be done using `cut -d' ' f1` but I'm wondering if there is an easy way with `awk` or `sed`. Text File: ™ trade mark ℹ information ↔..↙ left-right arrow..down-left arrow ↩..↪ right arrow curving left..left arrow curving right ⌚..⌛ watch..hourglass done ⌨ keyboard ⏏ eject button ⏩..⏳ fast-forward button..hourglass not done ⏸..⏺ pause button..record button circled M .. black small square..white small square play button reverse button _Want symbol list to follow description instead._

Use `sed`


sed 's/\([^ ]*\) *\(.*\)/\2 \1/' infile


This `\([^ ]*\)` will match everything until a non-space characters seen.
The parentheses `\(...\)` is used to made a group matching which its index would be `\1`.

The `\(.*\)` matches everything after first group and it's indexed `\2`.
The ` *` in `\(...\) *\(...\)` out of matched groups will ignore to print in output which is matching spaces between group 1 and 2, you could use `\s*` (with GNU `sed`) or `[[:space:]]*` (standardly) instead to match any spacing characters instead of just ASCII SPC as well.

Then at the end first we are printing matched _group2_ than _group1_ with a space between.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 983bceba1df1c415b608e0b2b7cfe523