Quantcast
Channel: Commands using expand
Browsing latest articles
Browse All 5 View Live

Image may be NSFW.
Clik here to view.

Convert all tabs in a file to spaces, assuming the tab width is 2

$ expand -t 2 <filename> Change the number to change the number of spaces. Leaving it out defaults to 8. Leaving out the filename defaults to stdin. And to do it in reverse, you can use the...

View Article



Image may be NSFW.
Clik here to view.

Expand tabs

$ function expand-tabs() { expand -t 8 "$1" > "$1.expanded"; mv -f "$1.expanded" "$1"; } I don't like TABs in sources files because in case of mixture of TABs and spaces they looks in different...

View Article

Image may be NSFW.
Clik here to view.

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

View Article

Image may be NSFW.
Clik here to view.

Dump an aspell dictionary as a word list

$ aspell -d en dump master | aspell -l en expand > words View this command to comment, vote or add to favourites View all commands by urdh Diff your entire server config at ScriptRock.com

View Article

Image may be NSFW.
Clik here to view.

Dump an aspell dictionary as a word list

$ aspell -d en dump master | aspell -l en expand > words View this command to comment, vote or add to favourites View all commands by xocoalt Diff your entire server config at ScriptRock.com

View Article

Browsing latest articles
Browse All 5 View Live




Latest Images