logan
logan

Reputation: 8346

Storing set of commands output to a shell variable throws error

In My shell script, I have following lines...

name=`grep -i "client" fin${i}.txt`
jobplan_name=`${name} | cut -d "=" -f4 | cut -d " " -f1`
echo ${jobplan_name}

Output:

<JOBP:  not found

Please correct me where the problem is

Upvotes: 0

Views: 73

Answers (1)

Geeb
Geeb

Reputation: 651

I think you need an echo:

jobplan_name=`echo ${name} | cut -d "=" -f4 | cut -d " " -f1`

Upvotes: 3

Related Questions