Reputation
1,453
Top tag
Next privilege 2,000 Rep.
Edit questions and answers
Badges
1 10 31
Impact
~75k people reached

  • 0 posts edited
  • 0 helpful flags
  • 61 votes cast
Jun
16
comment Sort one column only, keeping remaining columns untouched
i thought it was clear from the question and comments on it. anyway thanks for your help. you can edit the answer if you find another new way of doing it!
Jun
15
comment Sort one column only, keeping remaining columns untouched
your first column is not unchanged in first example. it's 2 1 5 1 in the end and it was 1 2 5 1 initially.
Jun
3
comment Sort one column only, keeping remaining columns untouched
did not work. It gave me output first column - 1 2 5 1 second column 1 3 4 3
Sep
13
comment sed match pattern N times
seems very complicated. what is \x?
Sep
11
comment Why does [a-z] asterisk match numbers?
@Cthulhu you got me!
Sep
10
comment Why does [a-z] asterisk match numbers?
How to use bash regex then? (see tldp.org/LDP/Bash-Beginners-Guide/html/sect_04_01.html)
Jul
26
comment Exit vim more quickly
somehow in my VIM Q was already mapped to :q by default. Thanks for the tip.
Jul
25
comment How to sort a collection of lines from different files?
Thanks it works, what's the purpose of nextfile though, it works even without nextfile.
Jul
25
comment How to sort a collection of lines from different files?
thanks for the awk FNR tip, but I also want to print the filename before sorted column. It needs storing "filename secondColumn" somehow. I think @Warwick's array suggestion will work.
Jul
9
comment iconv illegal input sequence- why?
How do find out which is the byte corresponding to offending character? I tried hexdump -C file command and got 0002b220 72 75 69 6e e6 0a 20 2d 2d 20 48 6f 72 61 63 65 |ruin.. -- Horace| as output.
Jul
9
comment iconv illegal input sequence- why?
@vinc17 how did you find out the file was in ISO-8859?
Jul
9
comment Grep with spaces suddenly doesn't work
Does this work? grep -E "HELLO[^\S+]FRIEND" file
Jul
8
comment Removing a specific line from a file
with certain versions of sed you don't need to do -i.bak just -i will do (but of course w/o backup file)
Jul
2
comment Finding all large files in the root filesystem
relevant find . -type f -print | xargs du -sk | sort -rn
Jul
2
comment Test for a particular file format
file: invalid option -- 'l' @illuminÉ
Jul
2
comment Normal looking text file, detected by file as ASCII Pascal program text
could you have a stab at unix.stackexchange.com/questions/140359/…;? thanks.
Jul
2
comment Test for a particular file format
thanks, i should have checked manpages. But unfortunately this doesn't work for the file I have uploaded in the linked question. file -k tmp still shows only ASCII Pascal program text as the only matching format whereas I expect it to match it with ASCII English Text.
Jul
1
comment Normal looking text file, detected by file as ASCII Pascal program text
yes, it's /etc/magic. not under $home, i just wanted to say that i have the magic file somewhere (it shows path when you do file -v)
Jul
1
comment Normal looking text file, detected by file as ASCII Pascal program text
@steeldriver see edit at the end of question.
Jul
1
comment Normal looking text file, detected by file as ASCII Pascal program text
@steeldriver yes, should i share it? Is there some version number for that file that will make you identify it?