Results 1 to 2 of 2

Thread: changing display of lines

  1. #1
    Join Date
    Aug 2013
    Beans
    37

    changing display of lines

    i have a file which contains the following lines

    apple - pears
    oranges - bananas
    is any way to get the file to swich so it displays

    pears -apple
    bananas - oranges
    any help would be appreciated guys

  2. #2
    Join Date
    Apr 2012
    Beans
    7,256

    Re: changing display of lines

    Is the difference in whitespace (no space between the - and apple) significant? if not I'd probably do something like

    Code:
    awk '{print $3" - "$1}' file
    or

    Code:
    awk '{print $3,$2,$1}' file

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •