Skip to content

Instantly share code, notes, and snippets.

@medanisjbara
Created January 1, 2022 13:52
Show Gist options
  • Save medanisjbara/7a80597e27ccc8a53448af065a2591d7 to your computer and use it in GitHub Desktop.
Save medanisjbara/7a80597e27ccc8a53448af065a2591d7 to your computer and use it in GitHub Desktop.
{
size=$1;
name=$2;
for (i=3; i<=NF; i++)
{
tmp=(name " " $i);
name=tmp
}
# filename=($0 ~ /'/)? ("\"" name "\""):("'" name "'")
filename=("'" name "'")
printf $1 " "
cmd=("ls -d " filename " --color")
system(cmd)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment