a=Hello-World
b=$(a|cut -d- -f1)
echo "$b"
The above commands are not working for me. Any input?
a=Hello-World
b=$(a|cut -d- -f1)
echo "$b"
The above commands are not working for me. Any input?
a=Hello-World
b=$(echo $a|cut -d- -f1)
echo "$b"
Why do people always ask such very easy questions? RTFM can resolve most of these questions. Learn by yourself first please.