Created
          January 22, 2017 19:32 
        
      - 
      
- 
        Save svetlyak40wt/c397649f69901fa82be7832adfe04cb0 to your computer and use it in GitHub Desktop. 
    Lisp's consistent white spacing, using magic format function
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/sh | |
| #|-*- mode:lisp -*-|# | |
| #| <Put a one-line description here> | |
| exec ros -Q -- $0 "$@" | |
| |# | |
| (progn ;;init forms | |
| ) | |
| (defpackage :ros.script.test-me.3694101834 | |
| (:use :cl)) | |
| (in-package :ros.script.test-me.3694101834) | |
| (defun main (&rest argv) | |
| (declare (ignorable argv)) | |
| (format t "Without new line") | |
| (format t "~2&DONE~%") | |
| (format t "With new line~%") | |
| (format t "~2&DONE~%") | |
| ;; Gives | |
| ;; Without new line | |
| ;; | |
| ;; DONE | |
| ;; With new line | |
| ;; | |
| ;; DONE | |
| ;; | |
| ;; Count of empty lines DOES NOT depends on if first line ends with new line symbol | |
| ) | |
| ;;; vim: set ft=lisp lisp: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| printf "Without new line" | |
| printf "\n\nDONE\n" | |
| printf "With new line\n" | |
| printf "\n\nDONE\n" | |
| # Gives | |
| # Without new line | |
| # | |
| # DONE | |
| # With new line | |
| # | |
| # | |
| # DONE | |
| # | |
| # Count of empty lines DEPENDS on if first line ends with new line symbol | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment