Преглед на файлове

Updated host-specific shell-file edit script

Samuel W. Flint преди 8 години
родител
ревизия
ab3620f31c
променени са 1 файла, в които са добавени 6 реда и са изтрити 4 реда
  1. 6 4
      edit-host-specific-shell-file

+ 6 - 4
edit-host-specific-shell-file

@@ -3,9 +3,11 @@
 if [[ -f ~/.`hostname`.zsh ]] ; then
     eaf ~/.`hostname`.zsh
 else
-    echo "# -*- shell-script -*-" > ~/.`hostname`.zsh
-    echo "# $(hostname) specific config" >> ~/.`hostname`.zsh
-    echo "" >> ~/.`hostname`.zsh
-    echo "" >> ~/.`hostname`.zsh
+    cat <<EOF > ~/.`hostname`.zsh
+# -*- shell-script -*-
+# $(hostname) specific configuration
+
+echo "You are on $(hostname -s)
+EOF
     eaf ~/.`hostname`.zsh
 fi