Link to home
Start Free TrialLog in
Avatar of AXISHK
AXISHK

asked on

Bash/ php script

dbdata=`mysql --default-character-set=utf8 -h$MYSQL_HOST -u$MYSQL_USR -p$MYSQL_PWD Cust -e "mysql -h$MYSQL_HOST -u$MYSQL_USR -p$MYSQL_PWD Cust -e "select id from sccsJob where status='Pending' order by id;" | sed "1 d"`

SAVEIFS=$IFS
IFS="$( echo -e '\t' )" read -ra jobinfo <<< "$dbdata"
IFS=$SAVEIFS

#DOMAIN=$(echo $JOBINFO | awk '{print $1}')
----------------
What does  the following mean :
#1 sed "1 d"
#2 IFS="$( echo -e '\t' )" read -ra jobinfo <<< "$dbdata"  .... any special meaning for <<< ?
SOLUTION
Avatar of Andrej Pirman
Andrej Pirman
Flag of Slovenia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry for wrong sed explanation. I was not sure about the exact syntax, so I looked over it too quickly.
sed '1d' as JMCG told, removes the first line and prints out the rest.
Avatar of AXISHK
AXISHK

ASKER

Tks