There may be times when you have finished up writing code, but need to change tabs to spaces for a file to display consistently among different computers. The
unexpand commands help you convert from spaces to tabs and tabs to spaces.
In a pipeline,
expand converts tabs to spaces. Using specific options, you can specify a number of parameters.
$ expand -t 4 sample.xml # Convert every tab into four spaces <?xml version="1.0" encoding="UTF-8"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Please do not forget me this weekend!</body> </note>
unexpand filter does the opposite - it converts spaces to tabs.
In this example, assume that each "tab" instance is four spaces.
$ unexpand -t 2 sample.xml # Convert every two spaces to a tab <?xml version="1.0" encoding="UTF-8"?> <note> <to>Tove</to> <from>Jani</from> <heading>Reminder</heading> <body>Please do not forget me this weekend!</body> </note>
Stretch out your back and relieve your back muscles with inversion therapy. This device counteracts the forces of gravity on the body by decompressing and elongating the spine. By using this product just ten minutes a day, you can be well on your way to improved circulation and posture while relieving muscle aches, back pain and stress.$$ Check price
Linux for Beginners doesn't make any assumptions about your background or knowledge of Linux. You need no prior knowledge to benefit from this book. You will be guided step by step using a logical and systematic approach. As new concepts, commands, or jargon are encountered they are explained in plain language, making it easy for anyone to understand.$ Check price