From 0dc0dfb777b91c64b3bba3370948fbe008f5a580 Mon Sep 17 00:00:00 2001
From: Meet Shah
Date: Wed, 21 Jan 2015 04:40:27 +0530
Subject: Fixed minor error in sample command in main slides.

A sample on application of mv command for renaming files had a minor error. Since the files to be renamed were being taken in a loop and they had spaces in their names, the mv command took the 2 parts of the string '$i' as its 2 inputs.Changed $i to "$i" and it works just fine.
---
 lecture_notes/source/using_linux_tools/handout.rst | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

(limited to 'lecture_notes/source/using_linux_tools')

diff --git a/lecture_notes/source/using_linux_tools/handout.rst b/lecture_notes/source/using_linux_tools/handout.rst
index 5ef762a..046e0d3 100644
--- a/lecture_notes/source/using_linux_tools/handout.rst
+++ b/lecture_notes/source/using_linux_tools/handout.rst
@@ -1986,13 +1986,15 @@ hyphens.
     echo $f|tr -s " " "-"|cut -d - -f 2-
   done
 
-Now we just replace the echo command with a ``mv``  command. 
+Now we just replace the echo command with a ``mv``  command. Note that ``Si`` 
+has to be within quotes as ``mv`` takes it to be 2 different inputs as it has 
+space in it. 
 
 ::
 
   for i in *.mp3
   do 
-    mv $i `echo $f|tr -s " " "-"|cut -d - -f 2-`
+    mv "$i" `echo $f|tr -s " " "-"|cut -d - -f 2-`
   done
 
 ``while``
-- 
cgit