Timeline for What is the difference between $* and $@?
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 25, 2012 at 21:09 | history | edited | Wojtek | CC BY-SA 3.0 |
deleted 55 characters in body
|
Jun 25, 2012 at 20:51 | comment | added | Mikel |
Unless IFS had a different custom value before calling the function. But yes, most of the time unsetting IFS will work.
|
|
Jun 25, 2012 at 17:39 | comment | added | Wojtek |
good point. unsetting IFS should solve that.
|
|
Jun 25, 2012 at 16:43 | comment | added | Mikel |
echo $IFS doesn't prove anything, because the shell sees the , , but then does word splitting using IFS ! Try echo "$IFS" .
|
|
Jun 25, 2012 at 16:03 | history | edited | Wojtek | CC BY-SA 3.0 |
added 69 characters in body
|
Jun 25, 2012 at 16:00 | comment | added | Wojtek |
Yes, I've checked that. For the peace of mind, I'll add the unset IFS at the end to reset it to the original, but it worked for me no problem and doing an echo $IFS resulted in the standard output I get from it. Setting the IFS withing the curly brackets introduces a new scope, so unless you export it, it will not affect the outside IFS .
|
|
Jun 25, 2012 at 15:11 | comment | added | Mikel | "changed within a function - doesn't affect the global". Did you test that? | |
Jun 25, 2012 at 13:22 | history | edited | Wojtek | CC BY-SA 3.0 |
added 148 characters in body
|
Jun 25, 2012 at 12:37 | history | edited | Wojtek | CC BY-SA 3.0 |
deleted 34 characters in body
|
Jun 25, 2012 at 12:32 | history | edited | Wojtek | CC BY-SA 3.0 |
added 153 characters in body
|
Jun 25, 2012 at 12:26 | history | answered | Wojtek | CC BY-SA 3.0 |