I am trying to create an ll with awk pipe alias. I am trying to escape the apostrophes using the following answers.
alias lh= `ll -h | awk {'print $9, \"-\" ,$5, \"-\", $8, \"-\",$7, $6'}`
But it doesn't appear to work.
The resulting console output for bash and zsh is the same.
awk: cmd. line:1: {print $9, \"-\" ,$5, \"-\", $8, \"-\",$7, $6}
awk: cmd. line:1: ^ backslash not last character on line
awk: cmd. line:1: {print $9, \"-\" ,$5, \"-\", $8, \"-\",$7, $6}
awk: cmd. line:1: ^ syntax error
When entering
alias lh= `ll -h | awk {'print $9, "-" ,$5, "-", $8, "-",$7, $6'}`
the output is meaning empty.
llon your system an alias forls -lor is it something else? – Ed Morton Feb 22 '23 at 21:25