Some operating systems include the command interpreter in the kernel. Others, such as Windows XP and UNIX, treat the command interpreter as a special program that is rmming when a job is initiated or when a user first logs on (on interactive systems). On systems with multiple command interpreters to choose from, the interpreters are known as shells. For example, on UNIX and Linux systems, a user may choose among several different shells, including the Bourne shell, C shell, Bourne-Again shell, Korn shell, and others. Third-party shells and free user-written shells are also available. Most shells provide similar functionality, and a user's choice of which shell to use is generally based on personal preference. Figure 2.2 shows the Bourne shell command interpreter being used on Solaris 10. The main function of the command interpreter is to get and execute the next user-specified command. Many of the commands given at this level manipulate files: create, delete, list, print, copy, execute, and soon. The MS-DOS and UNIX shells operate in this way. These commands can be implemented in two general ways. In one approach, the command interpreter itself contains the code to execute the command. For example, a command to delete a file may cause the command interpreter to jump to a section of its code that sets up the parameters and makes the appropriate system call. In this case, the number of comn'lands that can be given determines the size of the command interpreter, since each command requires its own implementing code.
บางระบบปฏิบัติการรวมถึงคำสั่งล่ามในเคอร์เนล อื่น ๆเช่น Windows XP และระบบปฏิบัติการยูนิกซ์ ถือคำสั่งล่ามเป็นโปรแกรมพิเศษที่ rmming เมื่องานเริ่มหรือเมื่อผู้ใช้ก่อนเข้าสู่ระบบ ( ในระบบสื่อโต้ตอบ ) บนระบบที่มีล่ามคำสั่งหลายเพื่อเลือกจาก ล่ามจะเรียกว่าเปลือก ตัวอย่างเช่น ในระบบ Unix และ Linux ,ผู้ใช้อาจเลือกระหว่างหลายหอย รวมทั้งสุตตะ ซีเชลล์ บอร์นอีกครั้งเปลือก , กาญจนบุรี , เปลือก , และคนอื่น ๆ เปลือกหอยของบุคคลที่สามและผู้ใช้เขียนฟรีเปลือกหอย นอกจากนี้ยังมี หอยส่วนใหญ่ให้ฟังก์ชันการทำงานที่คล้ายกันและทางเลือกของผู้ใช้ ซึ่งเปลือกที่จะใช้โดยทั่วไปขึ้นอยู่กับความชอบส่วนบุคคล รูปที่ 22 แสดงให้เห็นว่า สุตตะคำสั่งล่ามถูกใช้บน Solaris 10 หน้าที่หลักของคำสั่งล่ามจะได้รับและดำเนินการต่อไปที่ผู้ใช้กำหนดคำสั่ง หลายคำสั่งได้ในระดับนี้ จัดการไฟล์ : การสร้าง , ลบ , รายการ , พิมพ์ , คัดลอก , รัน , และเร็ว ๆนี้ ดอสและเปลือก Unix ใช้งานในลักษณะนี้ คำสั่งเหล่านี้สามารถดำเนินการในสองวิธีทั่วไปในวิธีการ , แปลคําสั่งนั้นมีรหัสที่จะรันคำสั่ง ตัวอย่างเช่น สั่งให้ลบไฟล์ อาจจะทำให้คำสั่งล่ามเพื่อข้ามไปยังส่วนของรหัสและตั้งค่าพารามิเตอร์และทำให้การเรียกระบบที่เหมาะสม ในกรณีนี้จำนวน comn'lands ที่สามารถให้กำหนดขนาดของคำสั่งล่ามเนื่องจากแต่ละคำสั่งต้องของตัวเอง การใช้รหัส
การแปล กรุณารอสักครู่..
