-   Linux - Newbie (
-   -   What does this command DIR=$(sed -ne "s:^FIRMWARE_DIR=\([^, ]*\)........ mean? (

aiia 09-09-2007 10:51 AM

What does this command DIR=$(sed -ne "s:^FIRMWARE_DIR=\([^, ]*\)........ mean?
DIR=$(sed -ne "s:^FIRMWARE_DIR=\([^, ]*\).*:\1:p" \
I try to install my wireless 1394 adapter, and in the Install guide, I can't understand this command, can anyone help me? Thank you!

druuna 09-09-2007 11:45 AM


The variable DIR is filled with the output of the sed command.

The sed command looks into this /etc/hotplug/firmware.agent file for a line that matches this regular expression ^FIRMWARE_DIR=\([^, ]*\).* (FIRMWARE_DIR=...... on the beginning of a line). It cuts out what is found with this [^, ]* part and prints it.

DIR will be filled with the part that is printed.

Hope this helps.

All times are GMT -5. The time now is 06:40 PM.