Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help4407


This forum is provided to promote discussion amongst students enrolled in Open Source Tools and Scripting (CITS4407).
 
Options:
RSS cloud
Jump to:

lec # wk 10 File Attributes - Square Bracket command external or internal

1 of 390 articles shown, currently no other people reading this forum.
photo
From: David M.
Date: Tue 9th Jun, 5:26pm
Actions: 
        Login-to-reply

 

Sometimes the same executable file supports multiple commands and executes the
one it was called with based on value of the program name (argv[0]) passed to it.
E.g. executable file X may be linked to by "a" and "b". When you run command "a"
the system runs command X with program name (argv[o]) set to  "a" but if you run
command "b" the system runs X but passes program name "b" as the parameter.
X executes differnt code deending on whether the passed parameter was "a" or "b".

Interesting exam question: Explain why "cd" must be a built-in (and not an external
command)?

Related articles

lec # wk 10 File Attributes - Square Bracket command external or internal (all 14) RSS
├─ original   Tue 9th Jun, 11:15am, Alastair H.
├─ reply 1   Tue 9th Jun, 4:26pm, David M.
├─ reply 2   Tue 9th Jun, 4:36pm, David M.
├─ reply 3   Tue 9th Jun, 5:15pm, Christopher M.
├─ THIS   Tue 9th Jun, 5:26pm, David M.
├─ reply 5   Tue 9th Jun, 7:50pm, Lee dB.
├─ reply 6   Tue 9th Jun, 9:01pm, Alastair H.  O.P.
├─ reply 7   Wed 10th Jun, 4:11am, Christopher M.
├─ reply 8   Wed 10th Jun, 4:12am, Christopher M.
├─ reply 9   Wed 10th Jun, 9:33am, Lee dB.
├─ reply 10   Wed 10th Jun, 3:28pm, Christopher M.
├─ reply 11   Wed 10th Jun, 6:39pm, Lee dB.
├─ reply 12   Fri 12th Jun, 3:51am, Christopher M.
└─ reply 13   Fri 12th Jun, 10:31am, Lee dB.
This Page


Program written by: [email protected]
Feedback welcome
Last modified:  5:31am Aug 04 2020