Help for the creation of a Dynamic menu generator for pekwm (Windows Manager)
#!/bin/bash
Actually i make 4 access on the single file for obtain each time one single data,is it possible obtain all the data on a single pass?
While is ok for me maintain 4 distinct variable.
Naturally using only bash or bash+sed or bash+awk or bash+grep+cut.
Last edited by alexscript; 02-16-2012 at 11:59 AM..
Reason: I think that title is more appropriate
Thanks i already resolved my initial questions few moment ago.
Problem solved.
Last edited by alexscript; 02-16-2012 at 11:56 AM..
Reason: In the end this for only a first attempt, see the follow reply until, i hope, the finish of the project ...
I find myself doing this sort of thing a fair bit and setting up a local param_val() function makes the code much more maintainable/extendable/readable,
and as long as your only processing a few files the overhead can pretty much be ignored, more often than not the file will still be in the cache anyway.
Remember your going to be comming along in a year or two and going "What the $%#$ is this damn awk script doing!"
Last edited by Chubler_XL; 02-14-2012 at 12:57 AM..
This User Gave Thanks to Chubler_XL For This Post:
I need line1, i tried to replace:
with
but on this way i obtain a wrong output.
So how i can write it properly?
Quote:
Originally Posted by Chubler_XL
Interesting.
I fix one error:
icon=$(param_val Icon $CF)
and i put the output and now work.
What mean the regular expression used on sed?
---------- Post updated at 10:14 AM ---------- Previous update was at 08:12 AM ----------
After more then one hour of search on that follow command:
i don't understand why use the symbol { and } over the first parameter.
And the last:
2.
While the /p if i understand correctly from Sed - An Introduction and Tutorial means:
Quote:
When the "-n" option is used, the "p" flag will cause the modified line to be printed.
I even make an attempt on test of the sed outside the script but i don't known where i made a mistake:
$ sed -e "s/^{Name}=//p" /usr/share/applications/firefox.desktop
Naturally using -n i don't have output so i used e.
Last edited by alexscript; 02-14-2012 at 05:21 AM..
Dear forum members,
My question is simple. I want to pass a single quote (') to be read as belonging as an addition to the letters C1', C2', C3', C4', C5', O1', O2', O3', O4' & O5' to the program voronota query-contacts which would be run through shell script and should print out numerical... (7 Replies)
Hello gurus,
I have a csv file with bunch of datas in each column. (see attached)
Now I have an .xml file in the structure of below:
?xml version="1.0" ?>
<component id="root" name="root">
<component id="system" name="system">
<param name="number_of_A" value="8"/>
... (5 Replies)
Given this file (I separated them in block to make my explanation clearer):
92157768877;Sof_deme_Fort_Email_am_%yyyy%%mm%%dd%;EMAIL;20/02/2015;1;0;0
92157768877;Sof_trav_Fort_Email_am_%yyyy%%mm%%dd%;EMAIL;20/02/2015;1;0;0
91231838895;Sof_deme_faible_Email_am;EMAIL;26/01/2015;1 0;0... (1 Reply)
Hi, I have 2 different values in the same column and two different values in other column
Query 1
ins name value
1 Test 12345
1 TestV1 12/10/2014
8 Test 85435
8 TestV1 11/11/2005
9 Test 42232
9 TestV1 19/10/2000
6 Test 54321... (6 Replies)
Hello to all,
I would like to search sequences of bytes inside big binary file.
The bin file contains blocks of information, each block begins is estructured as follow:
1- Each block begins with the hex 32 (1 byte) and ends with FF. After the FF of the last block, it follows 33.
2- Next... (59 Replies)
I have one configuration file. The number of lines in the file will vary. I need to pass each line as a parameter to a shell script in a single shot.
Ex:
Suppose file contains:
ou=x,o=z
o=y
Suppose the shell script name is sample.sh. Then the script should be called like sample.sh ou=x.o=z... (6 Replies)
Dear All
I am trying to write one shell which will be running through Cron which contain one SQL query. But I want to draw/fetch the Username password and Instance name (required to loging to the database) from one single file to run that SQL query . Also this file contain details of multiple... (2 Replies)
Hi all,
I am a newbie to servlet programming using webrick...
Was wondering how to accept data from a form and do necessary
processing..
To start with i wrote a sample servlet that accepts a name and prints
"welcome <name>"
But I do not know how to take this value from the form into the... (0 Replies)
hello hackers again. please help me out once again.
i have a script which executes CURL to fetch a file from the web and instantly outputs the files content to STDOUT.
now my question -
can i somehow write the progress-status to a file?
so that curl acts silently (-s) and only puts... (0 Replies)
Hi....can you guys help me out in this script??
Below is a text file script....called Bukom.txt and it contains these:
BUKOM 20060101 2.5 2.6 2.7 2.8 2.9 2.3 2.1
BUKOM 20060102 2.4 2.5 2.6 2.7 2.7 2.6 2.4
BUKOM 20060103 2.1 2.3 2.5 2.6 2.7 2.7 2.6
Can you guys help... (2 Replies)