Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

expand(1) [redhat man page]

EXPAND(1)								FSF								 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 whitespace -t, --tabs=NUMBER have tabs NUMBER characters apart, not 8 -t, --tabs=LIST use comma separated list of explicit tab positions --help display this help and exit --version output version information and exit AUTHOR
Written by David MacKenzie. REPORTING BUGS
Report bugs to <bug-coreutils@gnu.org>. COPYRIGHT
Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
The full documentation for expand is maintained as a Texinfo manual. If the info and expand programs are properly installed at your site, the command info expand should give you access to the complete manual. expand (coreutils) 4.5.3 February 2003 EXPAND(1)

Check Out this Related 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=NUMBER have tabs NUMBER characters apart, not 8 -t, --tabs=LIST use comma separated list of explicit tab positions --help display this help and exit --version output version information and exit AUTHOR
Written by David MacKenzie. REPORTING BUGS
Report expand bugs to bug-coreutils@gnu.org GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> COPYRIGHT
Copyright (C) 2009 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) The full documentation for expand is maintained as a Texinfo manual. If the info and expand programs are properly installed at your site, the command info coreutils 'expand invocation' should give you access to the complete manual. GNU coreutils 7.1 July 2010 EXPAND(1)
Man Page

14 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

counting tabs and/or whitespace

hey all, does anybody know a good way to count the number of tabs before a word in a line? Or maybe even whitespace, although tabs seem to be what is seperating the word from the beginning of the line? I have a specific file format I am parsing and trying to find child parent relationships. ... (2 Replies)
Discussion started by: nix21
2 Replies

2. UNIX for Dummies Questions & Answers

using expand on multiple files

I want to convert all leading tabs to spaces in all PHP files in a certain folder, recursively. I have successfully used "expand" to do this on one file at a time by doing something like this: expand -i file.php > file.php How would I convert all leading tabs to spaces in all PHP... (4 Replies)
Discussion started by: mattalexx
4 Replies

3. Shell Programming and Scripting

Scripting to convert underscores to spaces

Greetings, I have a bunch of music files that I want to strip the underscores out, and leave only spaces. All that I've found on the web is how to add underscores to files that have spaces, and reversing the "tr" command does not make a difference. Here is how to convert spaces to... (6 Replies)
Discussion started by: brakeb
6 Replies

4. UNIX for Dummies Questions & Answers

Problem with White spaces and tabs

Hi All, I am facing issues converting white spaces and tabs together in a file I am reading. Here is the command I am trying: tr -s ' '@ | sort -t@ +1n filename I guess the problem is that it is not converting the tabs to another delimiter. Also, I am supposed to accomplish this only using... (5 Replies)
Discussion started by: sh_kk
5 Replies

5. Shell Programming and Scripting

How to expand the same word?

Hi All, May I know how to expand the words? e.g: a aa aaa aaaa I have try to use for (i=0;i<5;i++) do c="a" echo -n $c done but the output is aaaaa. Is it need to use array?:confused: Thanks for your help! (5 Replies)
Discussion started by: natalie23
5 Replies

6. UNIX for Dummies Questions & Answers

How to expand who command?

When I do the who command it doesn't show all my info: $w gscn 6:08PM up 4 days, 20:33, 177 users, load averages: 7.46, 3.78, 3.43 USER TTY FROM LOGIN@ IDLE WHAT gscn R1 pool-92-199-17-1 5:46PM - w gscn Like in the 'From' column.... (8 Replies)
Discussion started by: guitarscn
8 Replies

7. Shell Programming and Scripting

replace spaces/tabs with delimiter |

Hi, I'm looking for a command that replaces spaces/tabs with pipe symbol and store the result to the same file instead of routing it to another file. infile outfile Thanks. (11 Replies)
Discussion started by: dvah
11 Replies

8. 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

9. Shell Programming and Scripting

Unix remove white spaces/tabs before & after pattern

Hi All, I wanted to know is there any way we can remove white spaces/tabs before & after some pattern { eg. before & after "," }. Please find below sample data below, Sat Jul 23 16:10:03 EDT 2011 , 12345678 , PROD , xyz_2345677 , testuuyt , ... (3 Replies)
Discussion started by: gr8_usk
3 Replies

10. UNIX for Dummies Questions & Answers

[Solved] Help with using tr - Removing white spaces

Hi, I have a file that contains whitespaces with spaces and spaces and tabs on each line and am wanting to remove the whitespaces. My version of sed is one that does not recognize \t etc. The sed and awk one-liners below that I found via Google both does not work. So my next best... (3 Replies)
Discussion started by: newbie_01
3 Replies

11. Programming

File operations in C pgm

i am reading and writing to a a file in C language. the input file is described as follows 111 aaa descr1 222 bbb descr2 333 ccc <SPACE> {6 spaces are left after ccc i.e in 3rd column} 444 ddd descr4 when i read and write to a file, the space is not coming in the output file.... (8 Replies)
Discussion started by: vkca
8 Replies

12. Emergency UNIX and Linux Support

Dealing with XLS file with multiple tabs

Hey Guys , Recently working on a requirement , i had to deal with XLS file with multiple tabs and the requirement was as below : 1. Convert one XLS file with multiple tabs to multiple CSV files. -- As i was working on MAC , so it was quite easy through APPLESCRIPT to deal with this.But... (6 Replies)
Discussion started by: himanshu sood
6 Replies

13. Red Hat

How to expand three LVMs?

Hello All, It goes like this.. I have increased the data hard drive of server by 100GB and rebooted the server. I want to expand each of the LVM's by 30GB each .There are totally three LVMS to be expanded.Any help on complete commands that needs to be followed?Thanks (4 Replies)
Discussion started by: gull05
4 Replies

14. 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