
space in command line args
I know this must be in the FAQ but still not able to find it , pls
excuse me
How to accept space in command line args
I have a simple script like this
#!/bin/bash
for i in $*;do
echo "ARG = $i"
done
exit 0
So if i run
export IFS=`echo -e "\n"`
./myscript.sh "hello ram"
I would expect
ARG = hello ram
BUT I get
ARG = hello
ARG = ram
BTW If I put export IFS line in the script it does work
I dont understand why
Thanks
Ram