Getting error for the script below

December 20, 2010 at 03:24:37
Specs: Linux
AUTHENTICATE = `cat AuthenticationFile.txt|grep "MD5:"|sed 's/ //g'|cut -d ":" -f2|cut -d "<" -f1`
echo "$AUTHENTICATE"

The error is given below.
"AUTHENTICATE: command not found"
I am using Linux server..


See More: Getting error for the script below

Report •

#1
December 20, 2010 at 10:56:26
Command substitution using back tics doesn't like spaces around the equal sign. Remove them:

#!/bin/bash

AUTHENTICATE=`grep "MD5:" AuthenticationFile.txt|sed 's/ //g'|cut -d ":" -f2|cut -d "<" -f1`
echo "$AUTHENTICATE"


Report •

#2
December 20, 2010 at 21:29:19
Thank you.. It works perfect.. :)

Report •
Related Solutions


Ask Question