unix - C - Piping program output -


my program needs read output of ls -l , determine files directories. tried ls -l | my_program.c, nothing happens , should return 2 directories made. how read input given ls -l?

compile program this

gcc my_program.c -o my_program 

then do

ls -l | my_program 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -