Thursday, November 29, 2018

loop through list of filenames which contain space characters in bash

"""
#!/bin/bash
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
for f in *
do
  echo "$f"
done
IFS=$SAVEIFS
"""

0 comments:

Post a Comment