code_junkie

Creating indented text with bash

Nov 13th, 2011
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. List: red, green, blue, black, cars,
  2. busses, ...
  3.  
  4. length=5
  5. echo "start:$(create_empty_line_of_length $length) hello"
  6.  
  7. start: hello
  8.  
  9. yes ' ' | head -7 | tr -d 'n'
  10.  
  11. man fmt
  12.  
  13. printf '%7s'
  14.  
  15. printf '%7s%sn%7s%sn' '_' 'hello' '_' 'world'
  16.  
  17. _hello
  18. _world
Add Comment
Please, Sign In to add comment