Reputation
11,940
Top tag
Next privilege 15,000 Rep.
Protect questions
Badges
7 47 100
Newest
 awk
Impact
~930k people reached

1d
comment Truncate the third column until given strings
+1, but I believe he does not want the 4 chars " PT~" (see sample output) - The OP's description of, "truncate the third column until " PT~" probably means *up to and including " PT~", which has a leading space which seems to corroborate that.
1d
comment Escape in awk invoked
@hjkefl: you probably need Rscript not R . Rscript can accept an input a file.
1d
comment Escape in awk invoked
@hjkefl: I find the question unclear (very unclear). To help us help you, please provide accurate sample input, and accurate expected sample output and which programs you prefer to use or must use. It seems like you want to remove all trailing Tab-characters (\t) from you input (which is a file?) and pass the output through to R (mathematics program) -- put that detail in your question not as a comment. I (and I'm sure others) don't have the time and/or inclinaton to guess what you mean.
1d
comment “head” only printing one line?
This is almost certainly not a Windows issue. the behaviour described does not apply to a \r\n line ending.. It is probably an Excel for Mac issue – "Basically, saving a file as comma separated values (csv) uses a carriage return \r" – see Excel and line endings
1d
revised “head” only printing one line?
a simpler 'how to fix it'
1d
revised “head” only printing one line?
cater for a mix of line endings
1d
comment “head” only printing one line?
Files which come from Windows do not have corrupted line breaks as such –they have Windows line breaks. When importing data with one OS's end-of-line style to another OS whose end-of-line style is different, it is just a simple cold fact that you need to cater for that (different) style in one way or another.
1d
revised “head” only printing one line?
added 376 characters in body
2d
revised “head” only printing one line?
added 9 characters in body
2d
revised “head” only printing one line?
added 46 characters in body
2d
revised “head” only printing one line?
added 46 characters in body
2d
revised “head” only printing one line?
added 137 characters in body
2d
answered “head” only printing one line?
2d
comment How to toggle or turn off text selection being sent to the clipboard
This Q/A (Askubuntu) may shed some light on the functioning of X-selection and how it interacts with Ctrl C,V,X clipboard: Inconsistant copy and paste behaviour. Is there a fix?
2d
comment How to toggle or turn off text selection being sent to the clipboard
I often just ignore X's text selection (centre click to paste), and just use Ctrl-C Ctrl-V Ctrl-X which is the clipboard (Not X's selection) they are different things. - For working in the terminal and some other situations, I find the X-selection is handy - otherwise I just use Ctrl C,V,X - It is very handy some times as it gives access to 2 stored strings. However the X-selecltion is simply built in to X, and it is rather volatile when flip from window to window and selecting text (which causes the previous one to be unselected) ...
Jul
2
comment Move up every other line to end of line containing character
Have you tried the paste version? - it works, but it will blindly join line 1+2, 3+4, 5+6, 7+8, etc
Jul
2
comment Move up every other line to end of line containing character
@user3738022: They both work for me.
Jul
2
awarded  awk
Jul
1
comment parsing a huge file with awk and extracting a subset
@ikrabbe: head -n10000000 is much faster than sed 10000000q
Jul
1
comment parsing a huge file with awk and extracting a subset
Yes, I was just looking into that.. I had a feeling it was too good to be true (removed now) - and adjusted time results.