Skip to main content

Questions tagged [eval]

5 votes
2 answers
438 views

In the shell I can do $ a=b b=c; eval echo \$$a c How do I do the same with GNU Make's $(eval) function? $ cat Makefile a=b b=c x:; echo {What goes here in order to get:} $ make c
Dan Jacobson's user avatar
0 votes
1 answer
158 views

I'm writing a shell script that changes its behavior based on the number of positional parameters passed script.sh if [ $# -eq 1 ]; then if [ -f "$1" ]; then validate='validate <&...
killua148's user avatar
1 vote
0 answers
19 views

I'm trying to do a db backup script using Bash. When adding a "Resume" feature to the script, I do the following loop calling defined functions to do step by step (depending on the .lock ...
James's user avatar
  • 111
0 votes
2 answers
684 views

In bash 5.0, I wish to capture the ${PIPESTATUS[@]} of a piped command that is executed via eval. However, eval appears to mask ${PIPESTATUS[@]}, but doesn't mask $? which is the equivalent to ${...
jitter's user avatar
  • 117
0 votes
1 answer
86 views

In a bash script: jenkins_folder=`cut -d "|" -f1 -s input.csv` jenkins_url='https://url.com:8181/jenkins/view/' echo "jenkins_folder : ${jenkins_folder}" for job in ...
Deepak Singhal's user avatar
1 vote
1 answer
1k views

I am trying to automate adding Homebrew to my path in a shell script, but these two lines do not evaluate inside my shell script: #!/bin/sh eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)&...
unrealapex's user avatar
0 votes
1 answer
409 views

There is a way to declare variable in eval ? For example function test { eval $1 } test " value="foo" echo "$value" " But it display nothing. ...
RevOneX9's user avatar
0 votes
2 answers
469 views

How to wrap a command to measure its elapsed time? Currently I do it using eval: do_cmd_named() { local name=$1 local cmd=$2 echo "$name" local start_time=$(date +%s) eval "$...
pmor's user avatar
  • 757

15 30 50 per page
1
2 3 4 5 6