iccaros

Linux Experts
  • Content Count

    1292
  • Joined

  • Last visited

Posts posted by iccaros


  1. ok the audio is being sent out raw? I would think there would be some way to change it over to PCM or what ever. It is going out via a toslink or optical into my 5.1 audio home receiver. It says it is getting a digital reception on the receiver. But I want the audio to be 5.1 all the time not 2 channel and then when I play DVD's it is 5.1.

    PCM is RAW...

    Also you have to set up audio on most DVD's to do 5.1 as they revert to stereo for default.

    also are you sending this audio to a TV then to a separate audio system.. if so under HDCP processing stereo is all you get.


  2. ok change but I can noit get it to write to the file

    just standard output

    ADDLINE="\<rdp_server\ client_audio=\"$AUDIO\"\ color_depth=\"$COLOR\"\ comment=\"$COMMENT\"\ experience=\"$EXPERIENCE\"\ gateway=\"$GATEWAY\"\ geometry=\"$GEOMETRY\"\ ip=\"$IP\"\ submenu=\"$SUBMENU\"\ title=\"$TITLE\"\ \/>"

    #sed -e "s/^<rdp_server/$ADDLINE/1" $INFILE > $TMPFILE
    sed -e "/^<rdp_server/a$ADDLINE/" $INFILE -e "/^<rdp_server/q" < $INFILE


  3. got it..

    {

    ADDLINE="\<rdp_server\ client_audio=\"$AUDIO\"\ color_depth=\"$COLOR\"\ comment=\"$COMMENT\"\ experience=\"$EXPERIENCE\"\ gateway=\"$GATEWAY\"\ geometry=\"$GEOMETRY\"\ ip=\"$IP\"\ submenu=\"$SUBMENU\"\ title=\"$TITLE\"\ \/\>"

    #sed -e "s/^<rdp_server/$ADDLINE/1" $INFILE > $TMPFILE

    sed "0,/^<rdp_server/a$ADDLINE/" $INFILE > $TMPFILE

    }

    Thanks..


  4. ok this is close

    <code>

    #Script Variables, hard coded values are site default

    AUDIO="On"

    COLOR="16"

    COMMENT="Created by addsub script"

    EXPERIENCE="0"

    GATEWAY="12.0.0.1"

    GEOMETRY="1660x1024"

    IP=""

    SUBMENU=""

    TITLE=""

    INFILE="./testfile"

    TMPFILE="./tempfile"

    function writeline()

    {

    ADDLINE="\<rdp_server\ client_audio=\"$AUDIO\"\ color_depth=\"$COLOR\"\ comment=\"$COMMENT\"\ experience=\"$EXPERIENCE\"\ gateway=\"$GATEWAY\"\ geometry=\"$GEOMETRY\"\ ip=\"$IP\"\ submenu=\"$SUBMENU\"\ title=\"$TITLE\"\ \/\>"

    sed -e "s/^<rdp_server/$ADDLINE/1" $INFILE > $TMPFILE

    }

    writeline

    </code>

    but I only want to append the line after the first find ?

    thanks


  5. hmmm

    but if i quote the variable is not passed its taken as a literal value

    I am writing this script to let a windows admin add line (questions will fill in the data later) so I am putting it in a script, if it was me I would just open the xml file and yyp the lines and edit them, but its not for me..

    I don't have ed but thanks


  6. really I want to find the first match then add my line, not to everyline that matches

    thanks

    I have been beeting my head on doing this in bash and python (my only choices besides pearl which I no nothing about)


  7. going to this

    ADDLINE='<rdp_server client_audio=\"$AUDIO\" color_depth=\"$COLOR\" comment=\"$COMMENT\" experience=\"$EXPERIENCE\" gateway=\"$GATEWAY\" geometry=\"$GEOMETRY\" ip=\"$IP\" submenu=\"$SUBMENU\" title=\"$TITLE\" />'

    sed -e s/^<rdp_server/"$ADDLINE"/ $INFILE > $TMPFILE

    gives me

    [email protected]:~$ ./addsub

    ./addsub: line 27: rdp_server/<rdp_server client_audio=\"$AUDIO\" color_depth=\"$COLOR\" comment=\"$COMMENT\" experience=\"$EXPERIENCE\" gateway=\"$GATEWAY\" geometry=\"$GEOMETRY\" ip=\"$IP\" submenu=\"$SUBMENU\" title=\"$TITLE\" />/: No such file or directory


  8. thanks for the reply but it still fails for me

    here is what I get./addsub: line 27: rdp_server/$ADDLINE/: ambiguous redirect

    [email protected]:~$ vi addsub

    [email protected]:~$ ./addsub

    ./addsub: line 27: rdp_server/$ADDLINE/: ambiguous redirect

    [email protected]:~$ vi addsub

    [email protected]:~$ ./addsub

    ./addsub: line 27: rdp_server/\<rdp_server client_audio="On"\ color_depth="16"\ comment="Created by addsub script"\ experience="0"\ gateway="12.0.0.1"\ geometry="90%"\ ip=""\ submenu="" title=""\ \/\>/: No such file or directory

    [email protected]:~$

    here is the entire script

    #Script Variables, hard coded values are site default
    AUDIO="On"
    COLOR="16"
    COMMENT="Created by addsub script"
    EXPERIENCE="0"
    GATEWAY="12.0.0.1"
    GEOMETRY="90%"
    IP=""
    SUBMENU=""
    TITLE=""
    INFILE="./testfile"
    TMPFILE="./tempfile"


    function writeline()
    {
    ADDLINE="\<rdp_server client_audio=\"$AUDIO\"\ color_depth=\"$COLOR\"\ comment=\"$COMMENT\"\ experience=\"$EXPERIENCE\"\ gateway=\"$GATEWAY\"\ geometry=\"$GEOMETRY\"\ ip=\"$IP\"\ submenu=\"$SUBMENU\" title=\"$TITLE\"\ \/\>"

    sed -e s/^<rdp_server/"$ADDLINE"/ $INFILE > $TMPFILE
    }


    writeline


  9. I have a bash script where I am trying to get this funtion to work

    it needs to find the first instance of a line and append a line after it

    function writeline()

    {

    ADDLINE="\<rdp_server client_audio=\"$AUDIO\"\ color_depth=\"$COLOR\"\ comment=\"$COMMENT\"\ experience=\"$EXPERIENCE\"\ gateway=\"$GATEWAY\"\ geometry=\"$GEOMETRY\"\ ip=\"$IP\"\ submenu=\"$SUBMENU\" title=\"$TITLE\"\ \/\>"

    eval "sed -e s/^<rdp_server/$ADDLINE/ $INFILE > $TMPFILE"

    }

    both $INFILE and $TMPFILE are declared the error I get is

    ./addsub: line 24: rdp_server/<rdp_server: No such file or directory

    thanks


  10. there is no difference in the server version and the desktop version, except the GUI (server version has non by default). The only reason there is a Server version is because some people can not get out of their heads that they should be different.

    under system --> administration --> services you can set if a service starts or not at boot..

    of wordpress it would be apache..

    but as JCL stated.. both apache and mysql take almost no resources unless you are accessing them..


  11. ok I have a neighbor who has been infected with at least antivirus 2009

    The issue, Malware bytes will not install, it comes up with the choose language and a splash of the next screen before it is is killed. Jeff recommended that and I followed the site that rename malware bytes install, and runs some batch files,, but still no joy, no joy in safe mode. I have tried hijackthis.. no joy can't install even when renamed.

    Cdrom does not work in safe mode, when you try to explore it takes you to My documents.

    This is a nasty little bugger, and I am ready to just format and start over, but its not my computer and they have not backed up..

    I can install http://www.pctools.com/spyware-doctor/ but they want $30 to remove it, I have no real issue, but I do not trust programs that will cure for a cost as that is same tactic that antivirus 2009 uses.

    so any suggestions are heeded.

    Thanks