Re: initialisation bash variables

2012-03-28 Thread Francky Leyn
On 8/15/2011 9:24 PM, Stephane CHAZELAS wrote: 2011-08-15, 17:15(+02), Francky Leyn: Hello, if you have a variable, say VAR, and you don't assign it a value, and afterwards you test it, what is the value of $VAR then? random, or an empty string? [...] Upon startup, the shell makes one

initialisation bash variables

2012-03-28 Thread Francky Leyn
Hello, if you have a variable, say VAR, and you don't assign it a value, and afterwards you test it, what is the value of $VAR then? random, or an empty string? Best regards, Francky

sed problem

2012-03-28 Thread Francky Leyn
Hello, I have the following problem: I must write a sed script that converts parts of groff syntax to LaTeX syntax. eg: .BI -o gif_output_file -> \textbf{-o} \textit{gif\_output\_file} Lets neglect the underscores for the moment. This can be dan with s/\.BI \([^ ]*\) \([^ ]*\)/\\textbf{\1} \\

Re: what is wrong here?

2012-03-28 Thread Francky Leyn
On 8/8/2011 2:17 PM, mhenn wrote: Am 08.08.2011 11:33, schrieb Francky Leyn: Hello, consider the following code: EXTENSION=jpg INPUT_FILES=*.$EXTENSION echo "$INPUT_FILES" #obviously wrong #instead maybe INPUT_FILES="$(ls *.$EXTENSION)" I tried something simil

strange behavior of assignment

2012-03-28 Thread Francky Leyn
INPUT_FILES=*.$EXTENSION echo $INPUT_FILES --> '*.jpg' instead of the empty string. Is there any way I can optain an empty string? I would like to test on the zeroness of INPUT_FILES. Best regards, Francky Leyn

what is wrong here?

2012-03-28 Thread Francky Leyn
w a dir without .jpg files. Then the if close also isn't executed, while it should. The script isn't exited and runs further with all wrong actions as consequence. What is wrong here? Best regards, Francky Leyn