Raouf Jacker Raouf Jacker - 4 months ago 7
Bash Question

Another way to redirect output in Bash



in bash when we want to read file we use the cat command

cat file.txt


but if we don't want to use whitespace , we can type:

{cat,file.txt}


Is there a way to redirect output without using the symbols > or < or &

i mean is there an equivalent to this command:

cat file.txt > /dev/null


and Thanks.

Answer

I don't understand why you'd want to, but you could do:

eval {cat,input} "$(echo _/dev/null | tr _ '\076')"
Comments