[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] Expand file contents, bash-style

From: Federico Prades Illanes
Subject: [Help-bash] Expand file contents, bash-style
Date: Tue, 26 Aug 2014 18:07:07 +0200

Hi help-bash,

Recently after upgrading from from SuSE10(bash 3.1.7) to RedHat6.4(bash
4.1.2), and I started to have minor problems with one bash script, only
when it runs under Jenkins :/

I have a text file(file.txt) with keywords I'd like to expand with bash to
actual files. When I run this under my regular user I got expected
behavior. When it runs under a Jenkins slave it gets quoted.

$ ls
> files.txt  foo  fool
> $ cat files.txt
> foo*
> $ cat
> #!/bin/bash -x
> echo $(< files.txt)
> $ ./
> + echo foo fool
> foo fool
> $

However under Jenkins

+ echo 'foo*'
> foo*

My first question, Is using $(<) an appropriate way to perform this

Second question, what can be affecting Jenkins slave invocation of the bash
to actually quote the expansion?

Thanks in advance, I hope I was clear and succinct enough.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]