06-24-2011
Have you tried to use pearl read file, and then parse it with awk?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi, I was wondering if there was a good way to create an array within a function, where the name is based on a passed argument? I tried this:
_____________________________
func(){
#take in 1st arg as the arrayname
arrayName=$1
let i=0
while read line
do
arrayName=${line}
let i+=1... (5 Replies)
Discussion started by: nix21
5 Replies
2. Shell Programming and Scripting
hi :)
i need help to explain arrays 2D in c shell
like this in c++
int a (6 Replies)
Discussion started by: hgphsf
6 Replies
3. Shell Programming and Scripting
I need to create arrays like this:
cnt=0
{ while read myline; do
if ];then
firstpass="${myline##<meas>}"
meas="${firstpass%%</meas>}"
tempmeas="${meas%%;*}"
MEAS$cnt=$tempmeas
print $cnt
print ${MEAS'$cnt'}
... (2 Replies)
Discussion started by: ajgwin
2 Replies
4. Shell Programming and Scripting
Hello all...
I'd like to create a variable from an array element from two arrays. In my search for answers I found this code for bash that joins two arrays and then started to work with it. I had got to work once and then foolishly without saving the code, I started to edit it for ksh and... (4 Replies)
Discussion started by: carlos25
4 Replies
5. Shell Programming and Scripting
how do you declare an array in the C shell and loop through each element? (2 Replies)
Discussion started by: npatwardhan
2 Replies
6. Shell Programming and Scripting
Hi guys
could you please post links that explain how to use and manipulate arrays in c shell (.csh files) ? examples are useful too :rolleyes: (5 Replies)
Discussion started by: domain
5 Replies
7. Shell Programming and Scripting
hi guys,
i have the following code in C shell..
set i=0
while ($i < 11)
master_array=${ARRAY}
i++
done
it gives me error at line 3: Variable syntax.
what is wrong here? any help is appreciated. (4 Replies)
Discussion started by: npatwardhan
4 Replies
8. Shell Programming and Scripting
I have three arrays. One is Master array and that has list of other array in config file.
for e.g (for simplicity I have only defined array with 2 elements each)
set +A MASTERARRAY SQLUPDATE_ONETIME SQLUPDATE_DAILY END_OF_ARRAY
set +A SQLUPDATE_ONETIME update12 update22 END_OF_ARRAY... (4 Replies)
Discussion started by: anish
4 Replies
9. Shell Programming and Scripting
Ok so spaces separate elements. What if you wanted an element to have a space in it?
For instance:
nums="one two three and a half"
where "three and a half" is THE SAME element? (3 Replies)
Discussion started by: stevenswj
3 Replies
10. Shell Programming and Scripting
Hello everyone,
First of all this is my first post and im fairly new to working with Unix and creating scripts etc. so there will probably be wrong phrases used.
Lets get to my questions.
I have multiple scripts that submit Slurms/Jobs to the cluster starting like this and doing certain... (3 Replies)
Discussion started by: idbemad
3 Replies
LEARN ABOUT DEBIAN
cs_parse_string
cs_parse_string(3) cs/cs.h cs_parse_string(3)
NAME
cs_parse_string - parse a CS template string
SYNOPSIS
#include <cs/cs.h>
NEOERR *cs_parse_string (CSPARSE *parse, char *buf, size_t blen);
ARGUMENTS
parse - a CSPARSE structure created with cs_init
buf - the string to parse. Embedded NULLs are not currently
supported
blen - the length of the string
DESCRIPTION
cs_parse_string parses a string. The string is modified, and internal references are kept by the parse tree. For this reason, ownership
of the string is transfered to the CS system, and the string will be free'd when cs_destroy() is called. The parse information will be
appended to the current parse tree. During parse, the only HDF variables which are evaluated are those used in evar or include statements.
RETURN VALUE
None
SEE ALSO
cs_dump(3), cs_destroy(3), cs_render(3), cs_register_esc_strfunc(3), cs_arg_parsev(3), cs_register_fileload(3), cs_init(3), cs_regis-
ter_strfunc(3), cs_arg_parse(3), cs_parse_string(3), cs_parse_file(3), =(3), cs_register_function
ClearSilver 12 July 2007 cs_parse_string(3)