आपकी स्क्रिप्ट में आप प्रतीक्षा कर सकते हैं। wait 10
10 सेकंड तक इंतजार करेगा और CTRL + C
के बिना प्रोग्राम से बाहर निकलने के लिए exit
कमांड देखें। यदि आप exit 0
का उपयोग करते हैं तो इसका मतलब है ठीक है। अलग-अलग संस्करण हैं, लेकिन मुझे नहीं पता कि वे मेरे सिर के ऊपर से क्या मतलब है।
exit 1
exit 2..... so on and so forth
अद्यतन
@ Celada
पार्टी की योजना बनाई कोई ज़रूरत नहीं। आप बस इतना कह सकते थे "शायद आप सही ढंग से सवाल नहीं समझ पाए" स्टैक ओवरफ्लो लोगों को सीखने में मदद करने के लिए यहां है, उन्हें फाड़ें नहीं। उन्होंने इसके लिए रेडडिट का आविष्कार किया। निकास कोड के लिए, आप कोड के साथ निकास() कमांड जारी करके प्रोग्राम को बाहर निकलने के लिए मजबूर कर सकते हैं। सीधे linux.die.net से।
Exit Code Number Meaning Example Comments
1 Catchall for general errors let "var1 = 1/0" Miscellaneous errors, such as "divide by zero"
2 Misuse of shell builtins (according to Bash documentation) Seldom seen, usually defaults to exit code 1
126 Command invoked cannot execute Permission problem or command is not an executable
127 "command not found" Possible problem with $PATH or a typo
128 Invalid argument to exit exit 3.14159 exit takes only integer args in the range 0 - 255 (see footnote)
128+n Fatal error signal "n" kill -9 $PPID of script $? returns 137 (128 + 9)
130 Script terminated by Control-C Control-C is fatal error signal 2, (130 = 128 + 2, see above)
255* Exit status out of range exit -1 exit takes only integer args in the range 0 - 255
टेक्स्ट फ़ॉर्म में Ctrl + C भेजकर आप वास्तव में क्या मतलब रखते हैं? – betabandido