Re: Jenkins 2.7 - How to list all files in a directory

2016-05-31 Thread Daniel Beck
> On 30.05.2016, at 19:43, Kristian wrote: > > for f in $(ls *.c); do Also, this is wrong. `for f in *.c` does the same thing, but has fewer bugs (spaces in file names etc.) -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe fr

Re: Jenkins 2.7 - How to list all files in a directory

2016-05-31 Thread Daniel Beck
> On 30.05.2016, at 19:43, Kristian wrote: > > Is this a bug? Are there any workarounds? Looks like there are no such files and then the shell does not glob. Look for 'nullglob' in `man bash`. -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group

Re: Jenkins 2.7 - How to list all files in a directory

2016-05-30 Thread Baptiste Mathus
Add #!/bin/bash as first line. 2016-05-30 19:43 GMT+02:00 Kristian : > Hello all, > > I have a problem. In a job of Jenkins, I want to iterate over a bunch > of files, e.g. *.c. This is done through a shell script for Linux, > e.g. > > for f in $(ls *.c); do > echo "$f" > done > > That is how i

Jenkins 2.7 - How to list all files in a directory

2016-05-30 Thread Kristian
Hello all, I have a problem. In a job of Jenkins, I want to iterate over a bunch of files, e.g. *.c. This is done through a shell script for Linux, e.g. for f in $(ls *.c); do echo "$f" done That is how it is written in the job. But when I start, Jenkins changes it into ++ ls '*.c' ls: cannot