LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell scripting .... (https://www.linuxquestions.org/questions/linux-newbie-8/shell-scripting-758431/)

comeatmanish 09-29-2009 06:26 AM

Shell scripting ....
 
Hi All,

I'm trying to write interactive shell script.
which will ask user to provide path where the files would be stored.

Since this path contains "/" (for.eg. /home/msk/current/log)
how can i make this readable using read.
Following is the script

#!/bin/bash

echo "Enter the path to search"
read DIR
HOMEMS=$DIR

for X in $DIR/*

do

awk -F';' '{print $1}' >> /home/msk/output.file

echo -n "#"

done


Please guide me.

Regards,
MSK

pixellany 09-29-2009 07:14 AM

Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.


All times are GMT -5. The time now is 08:31 PM.