sed "s/^\(\w*\) \(\w*\)/\2 \1/" YOUR_FILE_NAME > A_NEW_FILE_NAME"s/^\(\w*\) \([[:alnum:] ]*\)\t/\2 \1\t/"
sed -E -e 's/^([^ ]*) ([^ ]*) /\2, \1 /' YOUR_FILE_NAME > NEW_FILE_NAME
Unfortunately, most browser/terminal combos don't paste the tab characters properly (In fact, above, I've replaced them with four spaces each for illustration). So, start by pasting the following:
sed -E -e 's/^([^ ]*) ([^TAB]*)TAB/\2, \1TAB/' YOUR_FILE_NAME > NEW_FILE_NAME
sed -E -e 's/^([^TAB]*) ([^ ]*)TAB/\2, \1TAB/' YOUR_FILE_NAME > NEW_FILE_NAME
You are not logged in, either login or create an account to post comments
1. copy data into Excel where first-name and last-name share a cell
2. select that column
3. under the Data menu, select "text to columns"
4. select "delimited" and click next
5. click the box next to the "space" option
6. click next
7. switch the first-name and last name columns
This should put the first name and last name into separate columns. From there you can export into word and then convert the table to text with tab delimiters. There may be simpler ways, but this definitely works.
posted by jessamyn at 4:52 PM on February 17 [2 favorites has favorites]