oopsie
January 16th, 2011, 02:21 PM
I apologise for not being able to put what I mean into words very well. Is there an easy way to swap two pieces of text around?
I have a monstrosity of a line I've written for bash, and inside it is this
cut -d ' ' -f 5,8
Which you probably know shows the fifth and eighth element in a line of elements separated by spaces. What I'd like to know how to do though is to swap them around. I tried
cut -d ' ' -f 8,5
But that doesn't swap them around at all.
So, is there an easy way to do this?
I have a monstrosity of a line I've written for bash, and inside it is this
cut -d ' ' -f 5,8
Which you probably know shows the fifth and eighth element in a line of elements separated by spaces. What I'd like to know how to do though is to swap them around. I tried
cut -d ' ' -f 8,5
But that doesn't swap them around at all.
So, is there an easy way to do this?