LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-09-2010, 03:08 AM   #1
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Rep: Reputation: 0
How can I know how many spaces equals a tab in a linux terminator.


From the result below,it seems that a tab equals 7 spaces on my fedora.
How can I know this?And can I change the number of spaces that equals to a tab?
Any suggestion will be appreciated!
[test@localhost test]$ grep '^MANPATH' /etc/man.config | head -n 3 | expand -t 7 - | cat -A
MANPATH /usr/man$
MANPATH /usr/share/man$
MANPATH /usr/local/man$
[test@localhost test]$ grep '^MANPATH' /etc/man.config | head -n 3 | expand -t 8 - | cat -A
MANPATH /usr/man$
MANPATH /usr/share/man$
MANPATH /usr/local/man$
[test@localhost test]$ grep '^MANPATH' /etc/man.config | head -n 3 | expand -t 9 - | cat -A
MANPATH /usr/man$
MANPATH /usr/share/man$
MANPATH /usr/local/man$
 
Old 12-09-2010, 03:26 AM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
http://www.linuxquestions.org/questi...set-it-322368/
 
Old 12-09-2010, 08:53 AM   #3
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
Thank you,Tinkster.
I have read the post given by you carefully.
But it still didn't solve my problem.
I want to kow how many spaces equals a tab in my bash.
And I have tried the solution given in the post,but none of them work.
 
Old 12-09-2010, 10:54 AM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
A TAB is a character, no spaces equal it. You can use setterm to tell
your terminal emulator how many spaces to expand a TAB to.

Which terminal emulation are you using?


Cheers,
Tink
 
Old 12-09-2010, 11:07 AM   #5
e3399
Member
 
Registered: Nov 2010
Location: China
Distribution: Fedora12
Posts: 54

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Tinkster View Post
A TAB is a character, no spaces equal it. You can use setterm to tell
your terminal emulator how many spaces to expand a TAB to.

Which terminal emulation are you using?


Cheers,
Tink
xterm.
 
Old 12-09-2010, 04:16 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Try
Code:
TERM=linux setterm -regtabs 4
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to make a tab is 4 spaces width in vim? ICO SUSE / openSUSE 8 03-05-2013 11:24 AM
How do you change how many spaces contains a TAB character in the console (tty) ? zahadumy Linux - Software 2 05-18-2006 03:09 AM
How to set TAB to 4 spaces in vim? kornerr Linux - General 2 01-05-2006 02:26 AM
Linux in Asus Terminator 2? HateH Linux - Hardware 5 12-16-2004 11:27 AM
Kazaa, flashget and borland c++ equals in linux julian_s Linux - Software 13 03-06-2004 12:16 PM


All times are GMT -5. The time now is 10:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration