Skip to content

Instantly share code, notes, and snippets.

@helloqiu
Created March 22, 2016 12:22
Show Gist options
  • Save helloqiu/376c456f955bf2a52bcd to your computer and use it in GitHub Desktop.
Save helloqiu/376c456f955bf2a52bcd to your computer and use it in GitHub Desktop.
A silly shell to replace space with "_".
#!/usr/bin/bash
filename=$1
while read name
do
echo $name | sed -e 's/ /_/g'
done < "$filename"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment