Can someone help me with a script?
Hows it going, I am playing Quake these days and to get sound I need to emulate oss so I need to type into xterm (as ROOT)
echo "tyr-glquake 0 0 direct" >/proc/asound/card0/pcm0p/oss echo "tyr-glquake 0 0 disable" >/proc/asound/card0/pcm0c/oss Then logout of ROOT and cd into the quake folder as myself and type ./tyr-glquake -game hipnotic -hipnotic to play. I tried a simple script but keep getting a bad interpreter error, file not found. #!/bin/bash echo "tyr-glquake 0 0 direct" >/proc/asound/card0/pcm0p/oss echo "tyr-glquake 0 0 disable" >/proc/asound/card0/pcm0c/oss I run this as root in the quake directory where tyr-glquake is. I am new to scripts so would guess that maybe there is a path issue, the script is chmodded to 777 btw. Is there any way to login as root, execute the two lines, logout, change into the quake directory and then execute the last line to get quake running? It would be a whole lot easier. I can get Hello World script working so some of them work. Thanks |
Try this -
#!/bin/bash sudo echo "tyr-glquake 0 0 direct" >/proc/asound/card0/pcm0p/oss sudo echo "tyr-glquake 0 0 disable" >/proc/asound/card0/pcm0c/oss also make sure you are in the "sudoers" file, if not, run the command "visudo" as root and add your account name to run the commands without need of password. |
All times are GMT -5. The time now is 07:45 AM. |