गाइड से जुड़ी प्रश्नोत्तरी · मध्यम स्तर
How to Write Shell Scripts with AI Quiz
Checks safe prompting, dry-run review, shell quoting, platform differences, and practical safeguards before running AI-drafted scripts.
प्रश्न 1 का 8
AI द्वारा तैयार की गई क्लीनअप स्क्रिप्ट को फ़ाइलें हटाने देने से पहले, सबसे सुरक्षित पहला रन क्या है?
प्रत्येक प्रश्न का पूर्वावलोकन करें8 प्रश्न
जैसे ही आप प्रश्नोत्तरी लेते हैं उत्तर और स्पष्टीकरण दिखाई देते हैं।
- AI द्वारा तैयार की गई क्लीनअप स्क्रिप्ट को फ़ाइलें हटाने देने से पहले, सबसे सुरक्षित पहला रन क्या है?
- Use a dry run on a temporary folder and inspect every proposed path
- Run it as administrator to avoid permission errors
- Remove all error handling so failures are obvious
- Run it from the system root so relative paths are predictable
- प्रॉम्प्ट को स्पष्ट रूप से Bash या PowerShell का नाम क्यों देना चाहिए?
- Both shells use identical variables but different colors
- Their syntax and command behavior differ
- AI cannot draft code without a shell name
- The operating system chooses one shell for all scripts
- सबप्रोसेस तर्कों को सूची के रूप में पारित करने से आमतौर पर क्या रोकने में मदद मिलती है?
- All program errors
- The program from reading files
- A filename being interpreted as shell syntax when no shell is invoked
- The need to check exit codes
- एक जनरेट की गई स्क्रिप्ट उपयोगकर्ता द्वारा आपूर्ति किए गए फ़ाइल नाम से एक कमांड स्ट्रिंग बनाती है। आपको पहले क्या निरीक्षण करना चाहिए?
- Whether the filename is long enough
- Whether comments use full sentences
- Whether the script has a logo
- Whether the value can be parsed as shell metacharacters
- कौन सा प्रॉम्प्ट विवरण फ़ाइल-कॉपी स्क्रिप्ट के मसौदे को सबसे अधिक बेहतर बनाता है?
- The operating system, shell, source and destination behavior, and overwrite rule
- The user's favorite editor
- A request to make the script clever
- A request to omit assumptions
- A test reports success even though one copy failed. Which improvement best addresses this?
- Print a longer completion message
- Check command exit status and report partial failures
- Run the same command twice
- Hide standard error
- Why use the least privilege needed for a script?
- It makes scripts shorter
- It prevents all syntax errors
- It limits the damage if a command or path is wrong
- It guarantees the AI used official documentation
- After a script changes files, what is a useful verification step?
- Assume the dry run guarantees the result
- Delete the log to save space
- Immediately rerun it with broader permissions
- Compare changed paths with the preview and inspect sample outputs