Skip to content

Instantly share code, notes, and snippets.

@astail
Created July 21, 2015 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astail/ca331ddaed9c4685713a to your computer and use it in GitHub Desktop.
Save astail/ca331ddaed9c4685713a to your computer and use it in GitHub Desktop.
#!/bin/sh
dir=./piyopiyo
new_dir=~/hogehoge
if [ ! -e "$new_dir" ]; then
mkdir $new_dir
fi
data=`ls $dir`
column=`echo $data | wc -w`
erio=1
while [ "$erio" -le "$column" ]
do
kazu=`echo $data | awk "{print \\$$erio}"`
touch $new_dir/$kazu
erio=`expr $erio + 1`
done
echo end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment