Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

expand(1) [plan9 man page]

EXPAND(1)							   User Commands							 EXPAND(1)

NAME
expand - convert tabs to spaces SYNOPSIS
expand [OPTION]... [FILE]... DESCRIPTION
Convert tabs in each FILE to spaces, writing to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -i, --initial do not convert tabs after non blanks -t, --tabs=N have tabs N characters apart, not 8 -t, --tabs=LIST use comma separated list of tab positions The last specified position can be prefixed with '/' to specify a tab size to use after the last explicitly specified tab stop. Also a prefix of '+' can be used to align remaining tab stops relative to the last speci- fied tab stop instead of the first column --help display this help and exit --version output version information and exit AUTHOR
Written by David MacKenzie. REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report expand translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
unexpand(1) Full documentation at: <http://www.gnu.org/software/coreutils/expand> or available locally via: info '(coreutils) expand invocation' GNU coreutils 8.28 January 2018 EXPAND(1)

Check Out this Related Man Page

UNEXPAND(1)							   User Commands						       UNEXPAND(1)

NAME
unexpand - convert spaces to tabs SYNOPSIS
unexpand [OPTION]... [FILE]... DESCRIPTION
Convert blanks in each FILE to tabs, writing to standard output. With no FILE, or when FILE is -, read standard input. Mandatory arguments to long options are mandatory for short options too. -a, --all convert all blanks, instead of just initial blanks --first-only convert only leading sequences of blanks (overrides -a) -t, --tabs=N have tabs N characters apart instead of 8 (enables -a) -t, --tabs=LIST use comma separated list of tab positions The last specified position can be prefixed with '/' to specify a tab size to use after the last explicitly specified tab stop. Also a prefix of '+' can be used to align remaining tab stops relative to the last speci- fied tab stop instead of the first column --help display this help and exit --version output version information and exit AUTHOR
Written by David MacKenzie. REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report unexpand translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
expand(1) Full documentation at: <http://www.gnu.org/software/coreutils/unexpand> or available locally via: info '(coreutils) unexpand invocation' GNU coreutils 8.28 January 2018 UNEXPAND(1)
Man Page

12 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to change the tab size in vi?

the default size is 8. i found it's too big. how can i change the tab size in vi? is it a good idea to change it at all? thks (12 Replies)
Discussion started by: gusla
12 Replies

2. Shell Programming and Scripting

tab delimited file to commas

Hi there Just wondered if someone could help me out I have a file that has been delimited by tabs, ie field1<tab>fiield2<tab>field3 Does anybody know a command that will convert tabs to commas throughout the entire file? Note: there are a number of unpopulated fields in the file so... (6 Replies)
Discussion started by: hcclnoodles
6 Replies

3. Shell Programming and Scripting

how to align report headers in awk

Is it any way exept playing with spaces (tabs don't help) (3 Replies)
Discussion started by: galinaqt
3 Replies

4. UNIX for Dummies Questions & Answers

Replacing the Spaces

Hi, i have a tab dilimeted file.The records are :header is having column names.I am facing the following issue : I want to convert the spaces only for header file into "_" in the unix shell but the problem is that if i use sed command all the blank spaces are getting replaced by "_". For... (3 Replies)
Discussion started by: Amey Joshi
3 Replies

5. Shell Programming and Scripting

Converting 2 or more spaces to a single tab

I'm new to bash and want to know a simple sed, awk, or grep script that will find all instances of 2 or more spaces and convert them to a single tab. Thanks for the help in advance. (1 Reply)
Discussion started by: jkandel
1 Replies

6. Shell Programming and Scripting

issue with the query output in unix

I am running a query with contains blank spaces in between in the output. But when I open and read the file in UNIX i am not able to cursor the balnk spaces instead it is moving like tabs. Please help suppose my query - Select ' '||text from tab1; the cursor should move to 1st and... (1 Reply)
Discussion started by: sbmk_design
1 Replies

7. Shell Programming and Scripting

Print required values at end of the file by using AWK

I am looking help in awk, quick overview. we will get feed from external system . The input file looks like below. Detail Id Info Id Order Id STATUS Status Date FileDetail 99127942 819718 CMOG223481502 PR 04-17-2011 06:01:34PM... (7 Replies)
Discussion started by: dvrbabu
7 Replies

8. Shell Programming and Scripting

how to convert comma delimited file to tab separator

Hi all, How can i convert comma delimited .csv file to tab separate using sed command or script. Thanks, Krupa (4 Replies)
Discussion started by: krupasindhu18
4 Replies

9. Shell Programming and Scripting

How to use FS for mixed file?

Hi! All I am just wondering solution to use FS if file fields are separated by whitespace (one or more spaces ), tab and comma, How to use FS ? finally I want to print all columns as tab separated look at my file here tagged 130, US 121337 30.530 -58.900 1941 1 25 19.50 ... (5 Replies)
Discussion started by: Akshay Hegde
5 Replies

10. UNIX for Advanced & Expert Users

Vimrc creating tabs instead of spaces

I'm having trouble getting my vimrc to work the way I want it. For some reason after I hit enter it is creating tabs instead of spaces like I would expect. Here is an example of what I am talking about. $ = newline, ^I = tab. On the line of struct EDGETAG* q; I hit enter and it created a tab... (2 Replies)
Discussion started by: cokedude
2 Replies

11. UNIX for Beginners Questions & Answers

Match tab-delimited files based on key

I thought I had this figured out but was wrong so am humbly asking for help. The task is to add an additional column to FILE 1 based on records in FILE 2. The key is in COLUMN 1 for FILE 1 and in COLUMN 1 OR COLUMN 2 for FILE 2. I want to add the third column from FILE 2 to the beginning of... (8 Replies)
Discussion started by: andmal
8 Replies

12. UNIX for Beginners Questions & Answers

How to check string contain multiple tabs or spaces?

str contains tabs and multiple spaces str="hello world. How are you?" I want to check string start with hello world, and my code is: if ]world"* ]]; then echo "found" else echo "not found" fi Not work Other solution may work is to replace all tabs and... (4 Replies)
Discussion started by: cmdcmd
4 Replies