Unix Shell Programming: Add a blank line when printing

后端 未结 5 1488
盖世英雄少女心
盖世英雄少女心 2021-01-28 13:17

I am trying to list all the files in the directory but how would you separate each of the files by a blank line? basically each file displayed by separated by a blank line? I am

5条回答
  •  悲&欢浪女
    2021-01-28 14:17

    For reference : http://www.cyberciti.biz/faq/bash-loop-over-file/

    for f in /tmp/play/*
    do
      echo $f
      echo
    done
    

    Edited as per comments making it simpler.

提交回复
热议问题