"Manufacturer of SS Pipe Fittings, SS Butterfly Valves, Pharma Machineries Spares Parts, Dairy Equipment Spares Parts, Laboratory Spares Parts in India
Shubhlaxmi group is one of the leading manufacturers and exporters of stainless steel square tubes and rectangular tubes shubhlaxmi group has been granted An ISO 9001:2000 Certified Company in umbergaon.
Working on a little script the other day I had the need to determine if the input to the script was coming from a pipe or from the terminal. Seems like a simple enough thing to determine but nothing jumped immediately to mind and a quick internet search didn't help much either. After a bit of pondering I came up with two solutions: the stat command and using information from the proc file system.
R. Franke, F. Casella, M. Sielemann, K. Prölß, M. Otter, and M. Wetter. Proceedings of the 7th International Modelica Conference, volume 43 of Linköping Electronic Conference Proceedings, page 122--131. Linköping, Linköping University Electronic Press, Linköpings universitet, (2009)
R. Sałustowicz, M. Wiering, and J. Schmidhuber. Progress in Connectionist-based Information Systems:
Proceedings of the Fourth International Conference on
Neural Information Processing ICONIP'97, 1, page 502--505. Springer-Verlag, (1997)