I am sure there is an answer to this and I do not know what the search words should be. I have a devices that may change number on reboots /boots I need to reset a command based on a device's number post boot.
Code:
int veml_devno = 1;
in_file = fopen("/sys/bus/iio/devices/iio:deviceveml_devno/in_uvindex_input", "r");
In the example above I am appending the variable to
'device' and prepending it to
'/'. Is this possible in C? I've used curly braces in Bash to do this. Having a second thought, should the variable be a char? But then it sill has to be inserted into the command.