LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Scripting (?) question (http://www.linuxquestions.org/questions/linux-newbie-8/scripting-question-552477/)

ladio 05-09-2007 12:44 AM

Scripting (?) question
 
Greetings everyone,

I have the following lines of text (script?) that will change a certain (in this case bootmenu file).

Code:

^runonexit =/
s/$/discover rdpserver `checkhostname -i "\$RM_rdpserver"`;/
/^# RL3 anchor point/a
begin item
    name = runlevel
    type = radiobutton
    label = RDP
    default = 3
end
begin item
    name = rdpserver
    label = Set RDP server
    type = input|var|notempty|defaultfromenv
    bullet = <--
end
.
w
q
EOF


I have to write something like this to change another configuration file. My PROBLEM is that i don't know what kind of scripting (?) is this. It has to do with 'deltas' but i'm not pretty sure. I don't mind learning but i don't know what to look for to learn this stuff.

I'll really appreciate if someone can give me a hint on this. I'm very sorry if the question is not very clear or stupid.

Thanks in advance
Ladio

acid_kewpie 05-09-2007 02:13 AM

well it looks like a vi Ex script to update some sort of menu file. obviosuly hard to work out always what's code and what's data there, btu that seems like it. the menu itself i can find here... http://www.dslinux.org/index.php?showtopic=2049 and the ^, w, q etc... is the vi Ex mode stuff.

pixellany 05-09-2007 07:53 AM

Quote:

Originally Posted by ladio
I have to write something like this to change another configuration file. My PROBLEM is that i don't know what kind of scripting (?) is this. It has to do with 'deltas' but i'm not pretty sure. I don't mind learning but i don't know what to look for to learn this stuff.
Ladio

Where did you get this? That might give us a clue.
And what kind of config file do you want to change?

The more info you provide, the better the chances of getting help.

ladio 05-09-2007 12:03 PM

Thanks a lot for your help. Cris was right, it was Ex vi mode stuff. I managed to find some tutorials about that and managed to add and remove lines from inittab and xorg.config files.

I got the code i posted from some Diet-Pc (free thin client) file. I had to do some changes to the above mentioned files but i was totally lost.

Once more thanks a lot!

cheers,
Ladio


All times are GMT -5. The time now is 04:19 AM.