I have a red hat system that's offline and an ubuntu system that's online. I want to install some software on the red hat system but the dependencies are too many. I've read answers that tell downloading recursively on red hat systems but can I do this recursive download of red hat dependencies on an ubuntu system and then install them in the former?
You cannot download red hat packages easily from an ubuntu system, due to subscription limitations from the RHEL repositories. If your machines are on the same local network, you could install a proxy on the ubuntu machine, like
tinyproxy. This is a simple http proxy. Install it and then configure it in
/etc/yum.conf in the RHEL machine. This way you can download packages on your RHEL machine, which is not directly connected to the internet.