LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 08-24-2006, 04:40 PM   #1
linx win
Member
 
Registered: Jan 2004
Posts: 390

Rep: Reputation: 31
Need help with Kommander secripting


I am trying to write a program script using Kommander. I was able to do most of the functions in my program except the following:

- When I try to save a list content to a file, I do the following:
PHP Code:
@for(i0, @name_list.count1)
@
File.append(/home/knoppix/names, @name_list.item(i))
@endif 
But I noticed that it that the value of the variable i is always zero. Do I need to declare it as a vriable and how?

- I am using kommander commands and bash. I am using global to send some data to the bash scripts in the program but how to get the opposit? I mean to get kommander part of the script to recognize the vriables on the bash part of the script.
 
Old 10-23-2006, 02:24 PM   #2
RHTopics
Member
 
Registered: May 2006
Posts: 45

Rep: Reputation: 3
linx win,

With this thread being two months old, you probably have already determined the answer to your question. I am also attempting to learn how to use Kommander and had a similar problem.

Your example code was correct except in one place, the using of the "i" variable in the second line. It needs an "@" in front of it. So the complete example would look like this:

Code:
    @for(i, 0, @name_list.count, 1)
    @File.append(/home/knoppix/names, @name_list.item(@i))
    @end
The "@i" variable exists only within the "for loop".

From my understanding on how the Kommander parser works, it is best to not mix lines with Kommander script and bash script. The reason for this is, the Kommander script portions is parsed/executed first and then is followed by the bash script portions being processed and executed.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Kommander questions lini Linux - General 1 06-09-2007 02:16 PM
kommander lini Linux - General 1 02-22-2006 01:04 AM
kommander - 3 simple questions lini Linux - General 1 02-19-2006 04:10 AM
Kommander - dynamic label widget Artanicus Linux - Software 0 02-22-2005 11:00 AM
Kommander Editor under KDE 3.1.4 raym0nd Linux - Software 0 02-03-2004 10:18 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration