I am trying to modify the output of a command , store it to a variable and pass it to another command in a single line. I tried using xargs, but didnt work well.
hre is the first command
echo "DIS NAMELIST(CLUSNL.TO.QMWC.SSL) NAMES"|runmqsc -w 10 -x QMWC |grep NAMES |grep -v DIS
output is
NAMES(CLDEV.ISCC.74 ,CLPRF.ISCC.74 ,CLSYS.ISCC.74)
Modified ouput is to remove CLDEV.ISCC.74 and store the modified output to a variable
NAMES(CLPRF.ISCC.74 ,CLSYS.ISCC.74)
new command to be issued
echo "ALTER NAMELIST(CLUSNL.TO.QMWC.SSL) $VARIABLE"|runmqsc -w 10 -x QMWC |grep NAMES |grep -v DIS
Here is what I could get to get the desired output, but trying to figure out how to store this to a variable and pass it to new command
`echo "DIS NAMELIST(CLUSNL.TO.QMWC.SSL) NAMES"|runmqsc -w 10 -x QMWC |grep NAMES |grep -v DIS|sed 's/CLDEV.ISCC.74` ,//'