**** BEGIN LOGGING AT Sun Mar 25 03:00:04 2018 Mar 25 07:13:02 how would you use grep to search lines which contain \t (tab) more than once? (there can be n number of characters inbetween) Mar 25 07:14:58 i tried "grep $(echo \t) file.txt" It works but I could not figure out how to add another tab to search with varying number of characters inbetween Mar 25 07:48:46 Vajb: grep '\t.*\t' Mar 25 07:49:40 Vajb: or for at least `n` tabs, grep '\(\t.*\)\{n\}' Mar 25 09:46:46 Maxdamantus: thx, but they seem to give me false positives. Or I can not find tabs from the lines it claims to have double. My file should have single tab on everyline, but it seems to have more on some and I am having hard time spotting them. Mar 25 09:55:44 Vajb: try: sed '/\t.*\t/ s/\t/(&)/' Mar 25 09:55:47 eg Mar 25 09:55:49 er* Mar 25 09:55:53 Vajb: try: sed '/\t.*\t/ s/\t/(&)/g' Mar 25 09:56:02 assuming sed = gnused Mar 25 09:56:30 (since the `\t` syntax is a gnused extension) Mar 25 09:57:27 I just though that could it be that my scandic characters are messing up grep? Mar 25 09:57:40 trying sed now Mar 25 09:58:44 Unlikely to be messing up grep, unless you're using some extremely weird character encoding (UTF-8 and ISO/IEC 8859 encodings should be handled fine) Mar 25 09:59:37 Might want to do this to also avoid printing unmatched lines: sed '/\t.*\t/{ s/\t/(&)/g; t }' Mar 25 09:59:50 er, messed that up Mar 25 10:00:03 sed '/\t.*\t/{ s/\t/(&)/g; t }; d' Mar 25 10:01:17 last line says "undetermined {" Mar 25 10:01:48 and earlier sed command also gave false positives Mar 25 10:03:25 Hm, maybe busybox's sed sucks. Mar 25 10:04:46 or at least the busybox sed from many many years ago Mar 25 10:05:05 sed -n '/\t.*\t/ s/\t/(&)/gp' Mar 25 10:05:15 That one seems to work on Maemo's sed. Mar 25 10:09:35 Seems the issue with the brace versions is that Maemo's sed interprets '}' as a goto label. Mar 25 10:09:50 (so needs to be `t;`, not `t`) Mar 25 10:10:22 * Maxdamantus is pretty sure the semicolon is unnecessary there. Mar 25 10:16:55 last sed works as I wanted thanks a lot! **** ENDING LOGGING AT Mon Mar 26 03:00:02 2018