[gnome-commander] Adds output of commands in some scripts, fixes handling of filenames with spaces
- From: Uwe Scholz <uwescholz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Adds output of commands in some scripts, fixes handling of filenames with spaces
- Date: Sun, 4 Mar 2018 12:16:29 +0000 (UTC)
commit cea570ef06c3f3d57554d2a954c13b837198d406
Author: Uwe Scholz <u scholz83 gmx de>
Date: Sun Mar 4 13:15:23 2018 +0100
Adds output of commands in some scripts, fixes handling of filenames with spaces
gcmd-scripts/duplicate.sh | 6 ++++--
gcmd-scripts/filelist.sh | 5 +++--
gcmd-scripts/tar.sh | 2 +-
3 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/gcmd-scripts/duplicate.sh b/gcmd-scripts/duplicate.sh
index f9b41c0..d9aab67 100755
--- a/gcmd-scripts/duplicate.sh
+++ b/gcmd-scripts/duplicate.sh
@@ -1,11 +1,13 @@
#!/bin/sh
#name: Duplicate
+#term: true
# Written by puux <puuxmine gmail com> 2016
# Part of gnome-commander script plug-in system
-for n in $@
+for n in "$@"
do
- cp $n "1_$n"
+ cp "$n" "1_$n"
+ echo "cp \"$n\" \"1_$n\""
done
diff --git a/gcmd-scripts/filelist.sh b/gcmd-scripts/filelist.sh
index 354074a..d601105 100755
--- a/gcmd-scripts/filelist.sh
+++ b/gcmd-scripts/filelist.sh
@@ -8,8 +8,9 @@
echo "Enter file name:"
read list
-for n in $@
+for n in "$@"
do
- echo "$n" >> $list.txt
+ echo "$n" >> "$list"
+ echo "echo \"$n\" >> \"$list\""
done
diff --git a/gcmd-scripts/tar.sh b/gcmd-scripts/tar.sh
index b8d7d4d..38d2d84 100755
--- a/gcmd-scripts/tar.sh
+++ b/gcmd-scripts/tar.sh
@@ -4,5 +4,5 @@
# Written by puux <puuxmine gmail com> 2016
# Part of gnome-commander script plug-in system
-tar -cf archive.tar.gz $@ -z
+tar -cf archive.tar.gz "$@" -z
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]