InterviewSolution
Hi Friends, I want to assign the OUPUT of sed followed by cut command to a variable.I am using the syntax as FOLLOWS. a=`sed -n "1p" filename | cut -c1-30` echo $a Please help me regarding this.Thanks in advancesreekanthyou don't need to USE 2 tools to get the first 30 CHARACTERS. use HEAD Code: [Select]a=$(head -c30 file)echo $a
Your experience on this site will be improved by allowing cookies. Read Cookie Policy