mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

wikimv (206B)


      1 #!/bin/bash
      2 
      3 # move file in wiki folder (without changing incoming)
      4 
      5 FOLDER="$1"
      6 FROM="$2"
      7 TO="$3"
      8 FROMF="$HOME/$FOLDER/$FROM"
      9 TOF="$HOME/$FOLDER/$TO"
     10 
     11 mv -n "$FROMF" "$TOF" || (echo 'fail move'; exit 42)
     12