Questions tagged «stderr»

15
පයිතන්හි stderr වෙත මුද්‍රණය කරන්නේ කෙසේද?
Stderr වෙත ලිවීමට ක්‍රම කිහිපයක් තිබේ: # Note: this first one does not work in Python 3 print >> sys.stderr, "spam" sys.stderr.write("spam\n") os.write(2, b"spam\n") from __future__ import print_function print("spam", file=sys.stderr) බව පටහැනි බව පෙනේ Python ක Zen # 13 † ඒ දේ මෙහි වෙනස, සහ එක් ආකාරයකින් හෝ තවත් කිසිදු …

11
Stdout නොව, stderr නල කරන්නේ කෙසේද?
මම තොරතුරු කියවීම කරන වැඩපිළිවෙලක් stdoutසහ stderr, සහ මට අවශ්ය grepපැමිණෙන දේ හරහා stderr නොසලකා හරිමින් අතර, stdout . මට එය පියවර 2 කින් කළ හැකිය: command > /dev/null 2> temp.file grep 'something' temp.file නමුත් තාවකාලික ලිපිගොනු නොමැතිව මෙය කිරීමට මම කැමැත්තෙමි. ස්මාර්ට් පයිප්ප උපක්‍රම තිබේද?
1001 bash  grep  stdout  pipe  stderr 
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.