Replace spaces with tabs & format file source recursively within a directory

find . -type f -name \*.php | while IFS="" read i; do expand -t4 "$i" > "$i-"; mv "$i-" "$i"; done
Recursively find php files and replace tab characters with spaces. Options: "\*.php" -- replace this with the files you wish to find "expand" -- replace tabs with spaces (use "unexpand" to replace spaces with tabs) "-t4" -- tabs represent 4 spaces Note: The IFS="" in the middle is to prevent 'read' from eating leading/trailing whitespace in filenames.

1 Alternatives + Submit Alt

What Others Think

flatcap, it expands/unexpands *all* file contents. Isn't it? While my command uses smart vim formatting to *indent* using tabs, not touching those in strings, for instance
ruslan · 675 weeks and 3 days ago
Really? Unfortunately, I can't get your command to work. From the vim help on retab: Careful: This command modifies any characters inside of strings in a C program. Use "\t" to avoid this (that's a good habit anyway). By adding --initial to expand (or --first-only to unexpand), it will only work on leading whitespace. As a heavy user of vim, I'd have done this by macro or bufdo. Spawning vim for every file will really slow things down.
flatcap · 675 weeks and 3 days ago
flatcap, what about constructions like $a = array( 'key1' => '12', 'longlongkey' => 'someghing', 'second-long-k' => 12.34, ); ?
ruslan · 675 weeks and 3 days ago
It didn't format like what I mean. Look at this: http://susepaste.org/28853675
ruslan · 675 weeks and 3 days ago
Pug Puppies for Sale Near Me pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under $500 Near Me pug puppies for sale in texas pug puppies for sale $200 pugs for sale near me under $500 pugs for sale under $400 near me pugs for sale near me puppies for sale near me under $500 pug puppies for sale under $1,000 near me pug for sale pug puppies for sale under $300 Brindle Pug Pitbull Pug Mix Pugs for sale cheap Cheap pug affordable pug puppies for sale near me black pugs for sale near me White Pugs for sale pug dog for sale free pug puppies pug puppies for sale in my area mn pug breeders pug puppies indiana pugs for sale michigan PUG PUPPY ADOPTION Pug puppies for sale Pug puppies for sale near me Pug puppies near me Pug Puppies for Sale Under $500 Near Me Cute Pug Puppies Black pug puppies Black pug puppies for sale pug puppies for adoption black pug puppies for sale near me chihuahua pug mix puppies how much is a pug puppy teacup pug puppies baby pug puppies pictures of pug puppies pug puppies for sale in Ohio pug puppies price pug mix puppies teacup pug puppies for sale best food for pug puppy newborn pug puppies pug puppies craigslist pug puppies for sale craigslist adorable pug puppies how much does a pug puppy cost Pitbull pug mix puppies pug pit mix puppy pug puppies for sale $200 pug puppies for sale in NJ Pug puppies for sale in Wisconsin pug puppy cost pug puppy food royal canin pug puppy royal canin pug puppy food fawn pug puppy pug puppies for sale florida pug puppies for sale in Indiana pug puppies for sale in KY pug puppies for sale in NC pug dog puppy AKC Registered Pug Puppies For sale cheap pug puppies for sale near me cheap pug puppies for sale in California cheap pug puppies for sale in nj Black Pug Puppies for sale pugs puppies for sale
rahimhh21 · 81 weeks and 2 days ago
I need to to thank you for this very good read!! I definitely loved every little bit of it. I have you bookmarked to check out new things you post… KickAss Torrents
seomind · 77 weeks and 4 days ago
Mmm.. good to be here in your article or post, whatever, I think I should also work hard for my own website like I see some good and updated working in your site. Zwembad aanleggen
seomind · 72 weeks and 5 days ago
This post is good enough to make somebody understand this amazing thing, and I’m sure everyone will appreciate this interesting things. Zonnepanelen Sint-Genesius-Rode
seomind · 72 weeks and 5 days ago
Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog. Polyester zwembad
seomind · 72 weeks and 5 days ago
After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article. Zonnepanelen Sint-Pieters-Leeuw
seomind · 72 weeks and 5 days ago
This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck. Inox zwembad
seomind · 72 weeks and 5 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. Zonnepanelen Steenokkerzeel
seomind · 72 weeks and 5 days ago
Hi buddies, it is great written piece entirely defined, continue the good work constantly. Monoblok zwembad
seomind · 72 weeks and 5 days ago
This website and I conceive this internet site is really informative ! Keep on putting up! Zonnepanelen Ternat
seomind · 72 weeks and 5 days ago
This is my first time i visit here and I found so many interesting stuff in your blog especially it's discussion, thank you. Keramische zwembaden
seomind · 72 weeks and 5 days ago
I can see that you are an expert at your field! I am launching a website soon, and your information will be very useful for me.. Thanks for all your help and wishing you all the success in your business. Zonnepanelen Tervuren
seomind · 72 weeks and 5 days ago
Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog. Vinylester zwembad
seomind · 72 weeks and 5 days ago
Nice post! This is a very nice blog that I will definitively come back to more times this year! Thanks for informative post. Zonnepanelen Tielt-Winge
seomind · 72 weeks and 5 days ago
wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated. Aanleg zwembad
seomind · 72 weeks and 5 days ago
Easily, the article is actually the best topic on this registry related issue. I fit in with your conclusions and will eagerly look forward to your next updates. Zonnepanelen Tienen
seomind · 72 weeks and 5 days ago
I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. LPW zwembad
seomind · 72 weeks and 5 days ago
I just couldn't leave your website before telling you that I truly enjoyed the top quality info you present to your visitors? Will be back again frequently to check up on new posts. Zonnepanelen Vilvoorde
seomind · 72 weeks and 5 days ago
I just found this blog and have high hopes for it to continue. Keep up the great work, its hard to find good ones. I have added to my favorites. Thank You. Monoblock zwembaden
seomind · 72 weeks and 5 days ago
This is truly an practical and pleasant information for all. Thanks for sharing this to us and more power Zonnepanelen Wemmel
seomind · 72 weeks and 5 days ago
I've been looking for info on this topic for a while. I'm happy this one is so great. Keep up the excellent work Zwembad plaatsen
seomind · 72 weeks and 5 days ago
I read that Post and got it fine and informative. Please share more like that... Zonnepanelen Tremelo
seomind · 72 weeks and 5 days ago
All the contents you mentioned in post is too good and can be very useful. I will keep it in mind, thanks for sharing the information keep updating, looking forward for more posts.Thanks Zwembad tuin
seomind · 72 weeks and 5 days ago
I would like to thank you for the efforts you have made in writing this article. I am hoping the same best work from you in the future as well.. Zonnepanelen Wezembeek-Oppem
seomind · 72 weeks and 5 days ago
Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog. Zwembad laten plaatsen
seomind · 72 weeks and 5 days ago
This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post! Zonnepanelen Zaventem
seomind · 72 weeks and 5 days ago
Nice knowledge gaining article. This post is really the best on this valuable topic. Zwembad bouwen
seomind · 72 weeks and 5 days ago
This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post! Zonnepanelen Zemst
seomind · 72 weeks and 5 days ago
Nice knowledge gaining article. This post is really the best on this valuable topic. Laserontharing
seomind · 72 weeks and 5 days ago
Thanks for the best blog. it was very useful for me.keep sharing such ideas in the future as well. Zonnepanelen Zoutleeuw
seomind · 72 weeks and 5 days ago
I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post. Permanente ontharing
seomind · 72 weeks and 5 days ago
Pug Puppies for Sale Near Me pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under $500 Near Me pug puppies for sale in texas pug puppies for sale $200 pugs for sale near me under $500 pugs for sale under $400 near me pugs for sale near me puppies for sale near me under $500 pug puppies for sale under $1,000 near me pug for sale pug puppies for sale under $300 Brindle Pug Pitbull Pug Mix Pugs for sale cheap Cheap pug affordable pug puppies for sale near me black pugs for sale near me White Pugs for sale pug dog for sale free pug puppies pug puppies for sale in my area mn pug breeders pug puppies indiana pugs for sale michigan PUG PUPPY ADOPTION Pug puppies for sale Pug puppies for sale near me Pug puppies near me Pug Puppies for Sale Under $500 Near Me Cute Pug Puppies Black pug puppies Black pug puppies for sale pug puppies for adoption black pug puppies for sale near me chihuahua pug mix puppies how much is a pug puppy teacup pug puppies baby pug puppies baby pug puppies for sale pictures of pug puppies pug puppies for sale in Ohio pug puppies price pug mix puppies teacup pug puppies for sale best food for pug puppy newborn pug puppies pug puppies craigslist pug puppies for sale craigslist adorable pug puppies how much does a pug puppy cost Pitbull pug mix puppies pug pit mix puppy pug puppies for sale $200 pug puppies for sale in NJ Pug puppies for sale in Wisconsin pug puppy cost pug puppy food royal canin pug puppy royal canin pug puppy food fawn pug puppy pug puppies for sale florida pug puppies for sale in Indiana pug puppies for sale in KY pug puppies for sale in NC pug dog puppy AKC Registered Pug Puppies For sale cheap pug puppies for sale near me cheap pug puppies for sale in California cheap pug puppies for sale in nj Black Pug Puppies for sale pugs puppies for sale
Perfecthomepugs · 72 weeks ago
It was a very good post indeed. I thoroughly enjoyed reading it in my lunch time. Will surely come and visit this blog more often. Thanks for sharing. wireline tools
seomind · 71 weeks and 5 days ago
Three are usually cheap Ralph Lauren available for sale each and every time you wish to buy. We?na merino odzie? sklep
seomind · 70 weeks and 4 days ago
I must say, I thought this was a pretty interesting read when it comes to this topic. Liked the material. . . . . FIFA world cup live stream
seomind · 70 weeks ago
Thumbs up guys your doing a really good job. Natural dyes producer
seomind · 70 weeks ago
It is the intent to provide valuable information and best practices, including an understanding of the regulatory process. Webtoon XYZ
seomind · 70 weeks ago
Your site is truly cool and this is an extraordinary moving article. Legal Steroids
seomind · 68 weeks and 5 days ago
I need to to thank you for this very good read!! I definitely loved every little bit of it. I have you bookmarked to check out new things you post… clean?
seomind · 68 weeks and 1 day ago
Your site is truly cool and this is an extraordinary moving article. SMOORE TECH
seomind · 67 weeks and 2 days ago
Thumbs up guys your doing a really good job. epaper touch screen
seomind · 66 weeks and 5 days ago
I must say, I thought this was a pretty interesting read when it comes to this topic. Liked the material. . . . . ??????
seomind · 66 weeks and 5 days ago
Your site is truly cool and this is an extraordinary moving article. asynchronous motor manufacturer
seomind · 66 weeks and 4 days ago
Wonderful illustrated information. I thank you about that. No doubt it will be very useful for my future projects. Would like to see some other posts on the same subject! acrylic acid production
seomind · 66 weeks and 4 days ago
You re in point of fact a just right webmaster. The website loading speed is amazing. It kind of feels that you're doing any distinctive trick. Moreover, The contents are masterpiece. you have done a fantastic activity on this subject! http://www.choicenature.com/blueberry-extract.html">blueberry anthocyanins supplements supplier
seomind · 66 weeks and 4 days ago
Perfect House Of Pugs acquired a passion for animals, and the Pug puppy in particular, at a young age since I grew up in a house with lots of dogs. It was a natural ability to know how to grow, nurture, and care for animals. I knew what the future held when I met my wife, who essentially had the same enthusiasm as I have. Being a breeder is more of a passion for me than a profession since I get to witness people's faces light up when they successfully adopt a pug puppy from our facility. It is not possible to find happiness in anything else. PLEASE VISIT OUR WEBSITE LINK BELLOW FOR MORE INFORMATION ABOUT PUG PUPPIES. PUG PUPPY ADOPTION Pug puppies for sale PUG PUPPIES FOR SALE NEAR ME PUG PUPPIES NEAR ME PUG PUPPIES FOR SALE UNDER 500 NEAR ME CUTE PUG PUPPIES BLACK PUG PUPPIES BLACK PUG PUPPIES FOR SALE PUG PUPPIES FOR ADOPTION BLACK PUG PUPPIES FOR SALE NEAR ME CHIHUAHUA PUG MIX PUPPIES TEACUP PUG PUPPIES HOW MUCH IS A PUG PUPPY BABY PUG PUPPIES PICTURES OF PUG PUPPIES PUG PUPPIES FOR SALE IN OHIO PUG PUPPIES FOR SALE IN PA PUG PUPPIES PRICE PUG MIX PUPPIES TEACUP PUG PUPPIES FOR SALE BABY PUG PUPPIES FOR SALE BEST FOOD FOR PUG PUPPY NEWBORN PUG PUPPIES PUG PUPPIES CRAIGSLIST PUG PUPPIES FOR SALE CRAIGSLIST WHITE PUG PUPPIES PUG PUPPIES FOR SALE IN MICHIGAN PUG PUPPIES FOR SALE UNDER 500 ADORABLE PUG PUPPIES BRINDLE PUG PUPPY HOW MUCH DOES A PUG PUPPY COST PITBULL PUG MIX PUPPIES PUGS FOR SALE NEAR ME PUG PUPPIES FOR SALE 200 PUG PUPPIES FOR SALE IN NJ PUG PUPPIES FOR SALE IN WISCONSIN PUG PUPPIES MICHIGAN PUG PUPPY COST MERLE PUG PUPPY FOR ADOPTION BEST PUG PUPPY FOOD ROYAL CANIN PUG PUPPY FOOD FAWN PUG PUPPY PUG PUPPIES FOR SALE FLORIDA PUG PUPPIES FOR SALE IN INDIANA PUG PUPPIES FOR SALE IN KY PUG PUPPIES FOR SALE IN NC PUG PUPPIES FOR SALE IN TEXAS PUG PUPPIES FOR SALE MN PUG DOG PUPPY AKC REGISTERED PUG PUPPIES FOR SALE PUG ALL BLACK CHEAP PUG PUPPIES FOR SALE NEAR ME PUGS PUPPIES FOR SALE CHEAP PUG PUPPIES FOR SALE IN CALIFORNIA MINIATURE PUG PUPPIES FOR SALE NEAR ME MINIATURE PUG PUPPIES FOR SALE CHEAP PUG PUPPIES FOR SALE IN NJ KNOWN FACTS ABOUT PUG PUPPIES ADOPT PUG PUPPIS RECUE A PUG PUPPY PERFECT HOUSE OF PUGS PUG PUPPIES INSTAGRAM PINTEREST QUORA Google Page USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA USA
pugpuppies95 · 34 weeks and 2 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: