Questions tagged [tabulation]

Tabulation (or tab for short) is a horizontal whitespace that adjusts to a column width.

The tab character (ASCII/Unicode value 9, Ctrl+I) is a horizontal whitespace that extends to the next column boundary. Systems with a fixed character width, such as terminals, often default to columns that are 8 characters wide.

16 questions
46
votes
7 answers

command to layout tab separated list nicely

Sometimes, I'm getting as an input tab separated list, which is not quite aligned, for instance var1 var2 var3 var_with_long_name_which_ruins_alignment var2 var3 Is there an easy way to render them aligned? var1 …
Elazar Leibovich
  • 3,131
  • 5
  • 27
  • 28
44
votes
3 answers

set tab width for less output

Is it possible for less output to set the tab width to a number X as it is for cat?
polym
  • 10,672
  • 9
  • 41
  • 65
13
votes
5 answers

What command(s) will feed a tab-delimited text file and cut each line to 80 characters?

I've got multiple-line text files of (sometimes) tab-delimited data. I'd like to output the file so I can glance over it - so I'd like to only see the first 80 characters of each line (I designed the text file to put the important stuff first on…
user3082
  • 961
  • 2
  • 10
  • 18
10
votes
2 answers

How do I make Kate indent with spaces on Python files but use tabs for text files and other files?

My goal is to set Kate up to work properly on Python files but to use different settings (tabs not spaces) on other documents. I'm sure others are doing this, but I can't figure out a convenient solution. I appreciate any advice. Kate has settings…
MountainX
  • 17,168
  • 59
  • 155
  • 264
7
votes
4 answers

What is wrong with using "\t" to grep for tab-separated values?

I have a .tsv file (values separated by tabs) with four values. So each line should have only three tabs and some text around each tab like this: value value2 value3 value4 But it looks that some lines are broken (there is more than three…
TGar
  • 267
  • 3
  • 10
6
votes
5 answers

A shell tool to “tablify” input data containing ANSI escape codes

I have input containing ANSI color codes that I'd like to tablify. I want the output to remain colored, so the tablified output should maintain the ANSI color codes. Hence, naively stripping them away does not meet my requirements. For example, for…
Jimmy Dean
  • 71
  • 5
4
votes
1 answer

How does unexpand command really work?

I've already read some explananations about unexpand, but either I don't understand, or is not working as expected. Let's consider the following example: [root@hope log]# echo "A12345678B" | tr '[1-8]' ' ' | unexpand -a A B [root@hope log]#…
sebelk
  • 4,209
  • 10
  • 35
  • 54
3
votes
1 answer

How to set default tabs only for cat?

I prefer to set tabs 4 however this may have some side effects, such as for example ls out put may look not properly aligned. How might I configure the terminal / cat to use four spaces for tabs for cat only? Should I just alias / wrap cat to…
dotancohen
  • 15,494
  • 26
  • 80
  • 116
2
votes
2 answers

How to configure Kate to always use 2 spaces for tabulation?

By default Kate inserts 2 spaces on Tab press but switches to real tabs starting from the fourth Tab level. Can I disable this and use spaces always, regardless to the depth? I want this because I use Kate to code Scala, and using space pairs…
Ivan
  • 17,368
  • 35
  • 93
  • 118
2
votes
1 answer

Can I force column to emit whitespaces instead of tabs?

I'd like to tabularize a file with the column command: $ column -c 60 file.txt The output is nice on the screen, but unusable for my purposes because the items are seperated by tabs. for further processing, I need them as whitespace. Of course, I…
1
vote
1 answer

Expand tabs in file with utf8 characters

I use expand to expand tabs to spaces. For utf8 files expand doesn't work correctly. E.g. in ć\ta tab is expanded to 6 spaces while in a\ta to 7 spaces. How do I make it work for utf8 files?
Marcin Król
  • 243
  • 2
  • 9
0
votes
1 answer

Kate replaces text instead of indenting when typing Tab on selected lines

I tried to change all the indentation settings to fix another problem yesterday, but now I have the following problem and I don't know which setting causes it. If I select lines and type Tab, I would expect the selected lines to be indented.…
optical
  • 115
  • 4
0
votes
0 answers

How to prevent tabulated outputs of functons being messed up when using 'watch' over ssh?

While ssh-ing into my server I want to be able to monitor for activity over certain port using netstat. Instead of running it manually I want to automate it with watch. While the command (sudo netstat -apon | grep 44002) running by itself gives the…
KubaFYI
  • 113
  • 4
0
votes
1 answer

How to search for all tabs between two quotation marks with grep / egrep

I'm looking for all tabs between two quotation marks with grep / egrep in a bash. I tried grep -r . -e "\".*\t.*\"" grep -r . -e "\".*\\t.*\"" grep -r . -e "\".*\\\\t.*\"" grep -r . -e '\".*\t.*\"' grep -r . -e '\".*\\t.*\"' grep -r . -e…
Thomas Sablik
  • 132
  • 1
  • 8
0
votes
1 answer

What '\t' mean with 'tab' delimiter with 'cut' in BASH

In this command : cut -f2 -d$'\t' ('\t') what is it mean ? i saw it another question, i got the idea about "tab" delimiter but still want to know '\t' shortcut or sign or command for something How to define 'tab' delimiter with 'cut' in BASH
MAX LEARNING
  • 11
  • 1
  • 1
1
2