Commit b06bfe8c authored by Kai Lorenz's avatar Kai Lorenz

removed scripting error

parent a9d4f672
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# based on https://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/ # based on https://www.cyberciti.biz/faq/howto-move-migrate-user-accounts-old-to-new-server/
# Author: Kai Lorenz # Author: Kai Lorenz
# Last update 07.03.2019 # Last update 07.03.2019
sudo su
mkdir /move mkdir /move
cd /home/ || exit cd /home/ || exit
for f in */; do for f in */; do
......
...@@ -9,7 +9,6 @@ echo "Please enter the target username" ...@@ -9,7 +9,6 @@ echo "Please enter the target username"
read varTargerUser read varTargerUser
read -p "Please confirm, "$varTargerUser" is your target? Y/N " -n 1 -r read -p "Please confirm, "$varTargerUser" is your target? Y/N " -n 1 -r
echo # (optional) move to a new line echo # (optional) move to a new line
sudo su
if [[ $REPLY =~ ^[Yy]$ ]] if [[ $REPLY =~ ^[Yy]$ ]]
then then
varArchiveName=$({ date +%Y; echo -; hostname; echo -; echo $varTargerUser; } | sed ':a;N;s/\n/ /;ba' | tr -d '[:space:]') varArchiveName=$({ date +%Y; echo -; hostname; echo -; echo $varTargerUser; } | sed ':a;N;s/\n/ /;ba' | tr -d '[:space:]')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment