Q1: Are we allowed to use ANSI color codes in the output, or will that mess up the autograder?
Q2: In the context-free grammar provided:
```
shell_cmd -> cmd_group ((& | &&) cmd_group)* &?
cmd_group -> atomic (\| atomic)*
atomic -> name (name | input | output)*
input -> < name | <name
output -> > name | >name | >> name | >>name
name -> r"[^|&><;]+"
```
There is no mention of `;` used to separate sequential commands. Can we add it like so:
```
shell_cmd -> cmd_group ((; | & | &&) cmd_group)* &?
cmd_group -> atomic (\| atomic)*
atomic -> name (name | input | output)*
input -> < name | <name
output -> > name | >name | >> name | >>name
name -> r"[^|&><;]+"
```
Q3 Is it necessary to use all the gcc flags as described in the make file, since the -fno-gnu-keywords gives an error when I use it to compile the code? The error is as follows:
```
cc1: error: command-line option ‘-fno-gnu-keywords’ is valid for C++/ObjC++ but not for C [-Werror]
```
Q4: Is it necessary to get the Username and SystemName from syscalls or by reading system files or is it fine to use the Username and SystemName that is found via `echo $HOSTNAME` and `echo $USER`? If it is necessary to use environment variables, as they need to be exported.
Q5. How should whitespaces between commands be dealt with? Are whitespace a part of the command? Whitespace situation needs to be clarified.
Q6. For Part A.1 of shell, when I am in shell folder, I run the make file, the executable shell.out is created in the root directory, Mini-Project-1 and not in the shell directory itself, is that correct?
Q7. Can we create an object directory when we run make file in shell, so that we have all the .o files there?
Q8. for B1 hop the format for error handling is not mentioned what to print when there doesnot exist a folder with the name provided.
Q8. For the `reveal` command, the syntax is specified as `reveal (-(a | l)*)* (~ | . | .. | - | name)?`. Are we supposed to support the `-` as a valid path, similar to the way it is in `hop`?
Q9. Is > > considered as two '>' or just a single '>>'?
Q10. In the `reveal` command, we have been told that "[...] when neither flag is set, print files and directories in the format of ls.". Does this mean we have to split it into columns separated by spaces based on terminal width and max length of a name like native `ls` does? Or can we just print it space separated?
Q11. In B.1, can the "name" have symbols or can it be a path that does not exist? How to handle invalid syntax?
Q12. In the C shell, the actual current working directory is the virtual home directory for the running C shell? or do we show it as cwd and the actual path from the actual home directory in the C shell?
Q13. In 'hop' command, do the directories have to exist actually or we just add the name to the path?Are the directories real or virtual? Like do we ACTUALLY create the directories or just say that the directory exists without actually creating it?
Q14. In 'hop' 5th one will the absolute that might be specified will it be absolute from our system root directory or will it be from the directory that we are running the shell code?
Q15. In 'hop' if u do '..' this in the new shell home directory so do we have go to its parent or we just dont do anything?
Q16. For the `reveal` command, do we have to enable the `-l` option automatically if not writing to stdout, like `ls` does?
Q17. We are allowed to use `fprintf` to print to `stderr` right?
Q18. In the example provided for reveal, "<rudy@iiit:~> reveal ~" gives different output and "<rudy@iiit:~> reveal -la" gives different output. Explain please!
```
<rudy@iiit:~> reveal ~
osnmp1
<rudy@iiit:~> hop ..
<rudy@iiit:/home/rudy> reveal
osnmp1
<rudy@iiit:/home/rudy> hop
<rudy@iiit:~> reveal -la
.git
.gitignore
include
llm_completions
src
shell.out
Makefile
README.md
```
Q19. Only `"` and `'` are allowed or are there other symbols such as `\` for which we take whitespaces as part of the token?
Q20. Within a set of quotes, are the symbols `&<>|;` allowed as valid token characters.
Q21. While compiling the program , if there are multiple .c and .h files , cna we compile them using gcc and mentioning each file name in the command , like
''' gcc -std=c99 \ - D_POSIX_C_SOURCE=200809L \
-D_XOPEN_SOURCE=700 \
-Wall -Wextra -Werror \
-Wno-unused-parameter \
src/main.c src/frgrnd.c \
-o shell'''
for example ?
Q22. Can we add an extra wrapper Makefile in the root directory, to execute the individual Makefiles?
Q23. Can we give the LLM completions as markdown transcripts rather than images?, because long threads are very hard to take screenshot of
Q24.
`The project must be broken down into multiple .c and .h files based on functionality. Monolithic code in a single file will be heavily penalized.`
Is there a set number of c files/h files required to not invoke the penalty? Can we carry out each part atleast in a single file?
Q25. If we are ignoring newlines, carriage returns, how are we supposed to know if the user has stopped giving more input?
Q26. Can we have extra files (like .envrc) or will that mess with the autograder?
Q27. What is the maximum size of the input we will have to parse on our shell
Q28. In case of command1 > output.txt | command2 ; should the output be stored in output.txt and piped to command2 as well?
or according to some POSIX shells, they have stdout from command1 set as output.txt(fd) so command2 receives nothing in stdin via pipe, should we follow this?
Q29. Do we need to parse &&, << or || in our shell
Q30. echo hello\ world
if this is the given command, should it be interpreted as echo hello world itself by treating the \ as escape character?
Q31. Are we allowed to use functions like getline, getchar, getc, fscanf etc?
Q32. Upto what length of input (after the shell displays prompt) do we need to account for?
Q33. Do we need to do all the subtasks in a different c file, life for ex. do we need to do A1, A2 and A3 all in different files?
Q34. In C Shell,Part C will the commands be normal bash commands like ls,cat or will they be our shell command like hop ,reveal?
Q35. For the log command, do we have to store only hop and reveal commands? If no, then what to do in log execute <n> command for those other than hop and reveal?
Q 36 Can we use regex.h
Q37. While logging a command do we need to log complete input, or log commands as they get executed
for eg. say hop ..; reveal -l in this case hop.. and reveal -l should be considered as 2 different commands or a single command.
Q38. In command `<` filename X, does it take input from filename and following that executes X as normal argument to the command or is it treated as an error?
Q39.(extension of Q13). Apologies for the confusion. I wanted to ask whether the directories "hop" switches to are real or virtual. Like, do we need to actually create the directories in the system, like do file/dir management n all? Or just store in our C shell program that a directory with X name exists?/
Q40. Do we need it to print Valid and Invalid according to the command groups that have been mentioned in the document so far or according to the command groups in bash?
Q41. Will we be given pipelined/grouped commands to implement or will it only be simple commands?
Q42. What would `hello<<boys`output? Valid or Invalid? the case of `<<` has not been mentioned under the context free grammar
Q43. In B.3 "Always store the entire shell_cmd as defined in the CFG".Does this mean we should remove the trailing spaces and the extra spaces??
Q44. (for q38)its command `<` filename (following that) X. So does it read the input from filename and then X that follows that will be executed as a normal argument or will it be an error?
Q.45 Are we expected to log the shell commands that end up in a 'Invalid Syntax!' as well?
Q.46
if i have a file structure mp1/shell/src
if i put hop shell what should it show
Q47. In the given grammar:
shell_cmd -> cmd_group ((& | ;) cmd_group)* &?
cmd_group -> atomic (\| atomic)*
atomic -> name (name | input | output)*
input -> < name | <name
output -> > name | >name | >> name | >>name
name -> r"[^|&><;]+"
it is specified that ">>name" is accepted but it is not specified that "|name" is accepted. So should we not accept cases of the form "|name" and ";name"?
Q.48 Are we expected to implement hop in the middle of a series of commands in the pipeline? for example:
` command 1 | command 2 | .. | hop | .. | command n `
Q.48 is hop - like an undo command? like if I was in the home directory, and then did hop .. went to the previous directory, did hop .. again and went to the prev of prev directory, and then did hop -, it comes to the prev directory. If I now again do hop - will it come back to the home directory or go to the prev to prev directory?
Q.49 If I am in home directory of shell and do hop .. will it go to the previous directory of the home?
For eg if desktop/miniproject1/shell is my home directory as ~
Doing hop .. will it go to desktop/miniproject1?
Q.50 The reveal command, when it says lexicographically, is it case sensitive or case insensitive?
Q.51 In A.1 '~'is used to replace actual home directory or the home director we consider for our shell...ex : path/to/home/some/folders/shell_file_here...what is it expected to be ~some/folders/shell_file_here or just ~
Q.52 Should we output invalid syntax if the user inputs just ' ', '\t', '\n' or '\r'?
Q53. With regards to the answer to Q45 and the guideline "Do not store any shell_cmd if the command name of an atomic command is log itself", are we supposed to log a command with invalid syntax that contains `log`?
Q.54 If I have multiple redirections like ```grep hi < input1.txt < input2.txt``` and more than one of them do not exist, do I print the error message only for the last one or for all?
Q.55. What is the final directory for the following sequence of steps (assume initial directory was '~', and that "~/mini-project" exists).
```
$ hop mini-project
$ hop ..
$ hop .
$ hop -
```
Will it be: '~' or "mini project"? I.e. does the '.' cause the previous directory to become the current directory, or does it not modify the history at all?
Q 56. In reference to Q13's answer when I have just opened the shell and I am in the home directory if I do hop .. on the former Part 1 explanation given should it display the path as:
/home/
or /home/rudy/osn/mp1
Also are we suppsed to support commands like "hop ~/Downloads/xyz" when I am in any directory that is not a path to home?
Q57. Are commands like 1)reveal -lala - myfolder 2)reveal - - -lala 3)hop ~ .. 4)hop - ~ - ~valid? They seem to be valid as per the grammar but are otherwise meaningless. Also if valid, what should we implement for command 3) and 4) here?
Q58. Is the makefile supposed to be in the root directory of the repo, or in the shell folder? Cause "Your final code submission must be compilable using the command make all in the root directory of the git repository" means that the Makefile shouldn't be in the Shell folder unlike what the directory structure mentions, as we wouldn't be able to run the make command from the root then.
Q59. Is executing execvp allowed? I.e is using the PATH defined by bash allowed?
Q60. C.1: Command Execution
This part was implicitly required, and has just been added explicitly for clarity. You must allow the execution of arbitrary comands. This includes commands like cat, echo, sleep, etc.
this was the question of C1. What does arbitrary exactly mean, it would be better if you could actually specify the exact list of commands that are required
Q61. What is the maximum number of subdirectories and files that can be present in a directory?
Q62. How to handle the case when reveal gets too many arguements or an invalid flag?
Q63. How do we handle the case in reveal command when there is no previous directory i.e. the hop command hasn't been executed?
Q64. Do not store a command if it is identical to the previously executed command in the log. Here identical can mean syntactically or exactly. Take it to mean exactly.
could you give an example what exactly means
Q65. Requirements for Ctrl-Z (SIGTSTP): The shell must move the stopped process to the background process list with status “Stopped”.
Requirements for fg command:The command must bring a background or stopped job to the foreground.
Aren't these two statements contradicting each other? should a stopped process move to the background or foreground?
Q66. For the log command, is it okay if the commands are stored in a file? does the file have to be gitignored before submission or can it exist inside the source files?
Q67. ├── xv6/
│ ├── xv6_modifications.patch
│ ├── readcount.c
│ └── report.md # Or report.pdf
what is xv6_modification.patch, do we put the whole xv6-riscv codebase there or what exactly
Q68. Should background job notifications ([job_number] process_id) be printed to stdout or stderr when a background job is started? According to last test of the script it shouldn't as it's expecting only "Hi There!" but shouldn't the errors or completetion go to stdout/stderr acc to the requirements?
What is s
Q69. Are shell intrinsics (builtin functions like hop, reveal, log) backgroundable processes? like should they support `&` ?
Q70. How are we supposed to handle commands like "ls -l > file1.txt file2.txt", basically where there is a name variable after an input/output variable, specify the same for the command defined in the project?
Also for the commands mentioned in the assignment, none of them accept input from a file, so what to do if the user tries to pass some info to it?
Q71. Can we use #define _GNU_SOURCE for using the HOST_NAME_MAX length in 1st question? Or, should we just use 256 as the length?
Q72. "If a background command in a sequence is followed by more commands (e.g., cmd1 & cmd2), only cmd1 runs in the background."
does that mean cmd2 is not executed at all?
Q73. If the user enters a command that is not recognized by the shell (say a random sentence), how is our shell expected to behave?
Q74. Do flags need to be separated by a space, is "reveal -l-a" valid?
Q75. What is the purpose of output_file_name specified as an argument while executing client.c? It is not specified in the document that server needs to use this specific filename for output, so do we need to send a packet containing the same?
Q76. Does it matter where we print the errors? Like, do we do print the errors to stdout or stderr? Will the choice affect the autograder?
Q77. In the example provided for reveal, the sorting used is not lexicographical according to ASCII ??
```
<rudy@iiit:~/osnmp1> reveal -la
.git
.gitignore
include
llm_completions
src
shell.out
Makefile
README.md
```
Q78. When we use hop we have to do
```If the directory does not exist, output “No such directory!```
But what errno is set for such an error?? Or do we print "No such directory!" for all errors. Part of man page of chdir for reference:
```
RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set to indicate the error.
ERRORS
Depending on the filesystem, other errors can be returned. The more general errors for chdir() are listed below:
EACCES Search permission is denied for one of the components of path. (See also path_resolution(7).)
EFAULT path points outside your accessible address space.
EIO An I/O error occurred.
ELOOP Too many symbolic links were encountered in resolving path.
ENAMETOOLONG
path is too long.
ENOENT The directory specified in path does not exist.
ENOMEM Insufficient kernel memory was available.
ENOTDIR
A component of path is not a directory.
The general errors for fchdir() are listed below:
EACCES Search permission was denied on the directory open on fd.
EBADF fd is not a valid file descriptor.
ENOTDIR
fd does not refer to a directory.
```
Q79. What is the maximum number of background processes that we are expected to handle simultaneously?
Q80. Is this correct regex for reveal command??
```^reveal(?:\s+-(?:[al]+))*(?:\s+(?P<dir_name>[^|&><;]+))?$```
Q81. I have a similar doubt to q55 but a different function. If I carry out these in the hop function
desktop/osnmp`>`hop src
desktop/osnmp/src`>`hop ~
/~`>`hop -
then will the path be "/~" only (as it was previous) or it will be desktop/osnmp (as maybe ~ won't change the history ?)
Q82. If my command is hop ..|reveal should i change the current directory bcz in normal bash the cd .. | ls will not change the directory and list the files in the current directory
Q83. Adding onto the previous question, since we are supposed to fork for a background process as well, as per the requirements, do the changes made by the hop command persist?
Q84. In 1.3 part of networking, there is a mention of sender and receiver. Can I safely assume, sender is client and receiver is server always?
Q85. In Data Sequencing and Retransmission part of networking, for the sliding window part, there is no fixed window_size mentioned, can we take any of our choice?
Q86. What should `activities` output on the following:
`ls | grep file_name &`
1. `[pid] : grep file_name - Running` or
2. `[pid] : ls | grep file_name - Running`
Q87. For Networking, we're supposed to build on top of UDP so is it alright to use the code provided in a w boilerplate?
Q88. Related to Q86, when `ls | grep file_name &` finishes, does part D (Background execution) print
1. `ls | grep file_name with pid <pid> exited normally` or
2. `grep file_name with pid <pid> exited normally`
Q89.
`atomic -> r"(?P<NAME1>[^|&><;]+)(?P<WS1>\s+)((?P<NAME2>[^| &><;]+)|(?P<input>.+)|(?P<output>.+))*"`
`name -> r"[^|&><;]+"`
According to the regex of **name** it can consume whitespaces.
In the first named capture group **NAME1** of **atomic**, if it consumes spaces, how will we ever check whether **WS1** was able to capture spaces?
Q90. Are commands having multiple < and > allowed ? or we only have to handle this occurence - < > ?
Q91. Should the input and output redirection also work for the hop and reveal commands? Also should the pipe symbol also work with hop and reveal?
Q92. How are we expected to handle the case when the activities list is empty - either on initialisation or when all the processes have been terminated?
Q93. If any command has invalid syntax, say for eg log log, should we accept it just like we are accepting any other string which is not a command as it passes the parser or should we print invalid syntax?
Q94. How to respond if the user enters invalid signal number with the ping command?
Q95. The regex version of the grammar says that no trailing whitespaces are to be considered but some answered questions suggest that it is allowed. So do we consider trailing whitespaces at the start of the input or just skip them (eg. 'input' is allowed but ' input' is not)
Q96. Will there be an automated code run for networking as well, as there is no real format given for error handling, or handling of some cases of how the client and server shld behave in certain instances, like say when the client starts but not the server, should the client terminate saying unable to connect to server or just keep waiting for a given time period until the server responds.
Q97. For the log command should log any sequential command that has a log command in it? eg: cat input.txt ;log ; echo hi
Q98. How should we deal with the whitespaces in the front?
For example, if I execute " hop .." , should it give the same output as `hop ..`
Q99. `Do not store a command if it is identical to the previously executed command in the log`. Just to be clear, this means that we only have to check if only the LAST command was same, and NOT the rest of 14 commands, right?
Q100. should ```reveal name -a``` result in a syntax error?
Q101. ```If the file does not exist or cannot be opened, the shell must print “No such file or directory” and not execute the command.```
This is specified for C2. For C3, what should we print if there's an error in opening the output file?
Q102. Activation: The logging mode must be activated by setting an environment variable RUDP_LOG=1. If this variable is not set, no log file should be created or written to.
in Networking part, what does this mean? what I am doing is put smtg like this on terminal RUDP_LOG=1 ./client 127.0.0.1 8080 input_test.txt output.txt, and then the client_log.txt is automatically created and logs are sent in the format given in assn, similarly I am setting that variable in terminal before running server code, and it creates server_log.txt. Is that correct, or should that variable be set smwhere in the code itself?
Q103. So, the index of job number being assigned by Bash for background processes is reset after all background processes has been terminated and printed on terminal. Do we also need similar behaviour in our shell, or reseting it only for a new session will be fine??
```
username@hostname:~/Desktop$ sleep 2 & sleep 2 &
[1] 149923
[2] 149924
username@hostname:~/Desktop$
[1]- Done sleep 2
[2]+ Done sleep 2
username@hostname:~/Desktop$ sleep 2 &
[1] 149926
username@hostname:~/Desktop$
```
Q104. "If the file does not exist or cannot be opened, the shell must print “No such file or directory” and not execute the command." Apart from this message can the program additionally also display perror message like Failed to execute command or something like that or would it fail in the autograder if such a case arises?
Q105. For the log command in C shell, are we supposed to store the command history in a file or in some data structure in the programm itself?
Q106. For the log command in C shell, do we need to store the command logs across different shell sessions? Like, say a ran 1st session, punched in few commands, terminated the program, ran it again, and entered log command, so should it show logs from the previous session or an empty file?
Q107. cat < nonexistent.txt < hello.txt Should this command print the contents of hello.txt on terminal or raise an error as the file nonexistent.txt doesn't exist?
Q108. "If any command in the pipeline fails to execute, the pipeline must still attempt to run the remaining commands." So it should be printing the error message and then the result of the following commands in the pipeline, right?
Q109. Are we supposed to log inputs with invalid syntax/failed execution? If yes, then how shall ```log execute <i>``` as an atomic command in the input behave if the i_th command in the history resulted in an invalid syntax? [where the input could be ```command1 | log execute i | command2```]
Q110. How exactly are we expected to do part C? Are we allowed to invoke bash in the case of say "echo "hello world" "
Q111. When Ctrl D is pressed, is it expected that the current process will terminate or is it pressed when the shell is taking the input?
Q112. When a pipeline process is running, should the activities command display the whole pipeline as a single entity or each process individually in the pipeline?
Q113. If no job number is passed to the bg command, is it expected to handle the most recent job number?
Q114. If I execute
`hop ~` and then `hop .. -`, for `-` command, is the previous directory that we should move to considered as the directory before executing `..` or the one before executing `~`
Q115. In the three way handshake the client has to send an ACK in response to a SYN-ACK received from the server, but there is no log specification for that (ideally SND ACK FOR SYN). What to do in this case?
Q116. Are piped commands supposed to run parallely or running them sequentially is okay?
Q117. If a command is not found (e.g., I run `non-existent-command`), what is the expected output? Is printing "Command not found" okay?
Q118. Can we run the intrinsic shell commands ("hop", "reveal", "log") in child processes? (But to actually run those commands, I won't be using any exec system calls as "exec system calls are BANNED for PART B")
Q119. Is `hop .. .. -` same as staying in the same directory or `hop ..` ?
Q120. If we run `log <invalid command>`, should we print nothing or should we print an error message of some sort?
Q121. If we give an input redirection to log, should it print an error message?
Q122. if a valid log command is in a pipe or sequential input, then will that input be stored in the logs as is? Will it be stored be stored, but log command removed from between the pipes/sequence, or will it not be stored at all?
Q123. Extra logs for network part won't be a problem correct?
Q124. In part D2, what defines an abnoraml exit, ie is "ls fakefile &" supposed to give normal or abnormal because it did throw an error but also the program exits noramlly using exit()
Q125. Should we store the log command that is part of a sequential command eg: echo hi; log (or) log;echo hi
Q126. The last test case, in the testing script given on moodle, is:
`expected = "Hi There!"`
`sleep 10 & echo {expected} > test.txt; cat test.txt`
Expected Output: "Hi There!\r\n"
Aren't we supposed to print job number and process ID for "sleep 10 &"? (Part D2, Requirement 2)
Q127. In relation to Q57, should a command like `hop .. .. .. .. ~ /` execute? As in the test script this executes to give `/` as the directory, but according to Q57 this isnt a vaild command. In case this isnt a vaild command, what should happen? Else if this is a valid command, are `.. .. .. .. ~ /` being executed in sequence, or is only the last one being executed?
Q128. Can we assume the commands `fg` and `bg` will never be used in a pipeline? Also can `log execute/log purge/log` be used in a pipeline? Can you specify for each form of `log`?
Q129. Do we also have to include the screenshot of the llm chat even if we just learnt something or asked about a concept? or just the llm generated code block's screenshots?
Q130. For background execution, if the & symbol is after a pipeline, say
cmd1 | cmd2 | cmd3 | cmd 4 &
then does only cmd4 become a background process or the entire pipeline?
Q131. Since readcount() system call will be implemented in the xv6 directory, how are we supposed to push the project to github including the xv6 directory? Can the directory structure for the xv6 part be mentioned? Please also mention the marks split for the xv6 part, as part A has not marks assigned to it, and it is ambiguous whether the bonus part for 25 marks is included in the 140 or excluded from it.
Q132. 
What is the highlighted line reffering to? There is no such feature mentioned in Part A.
Q133. It seems in the script given on moodle, there are 2 faulty test cases.
One of them is Q126. The other is about "lexicographic" sorting of output of the reveal command.

the test case script gives the following list as the "expected" lexicographic order,
['.', '..', '.git', '.gitignore', 'llm_completions', 'Makefile', 'README.md', 'shell.out', 'src']
This is contradictory to the project statement, which says we should sort by ASCII values. (The given list is doing case-insensitive sorting, but if we use ASCII values, clearly files starting with a capital letter will come first).
Q134. While displaying name of the path on which shell is being called, is it okay if the physical path is shown instead of the logical path? If I run it from `/bin` (logical path; output of `pwd`), I am getting `/usr/bin`(physical path; output of `pwd -P`).
Q135. in networking, when we say define loss rate 0.5 at lets say server side, and we are sending a file, so sender is client and receiver is server. does it mean the client will drop 50% of data and send it to server, and then client will retransmit, or server on receiving it drops 50% of data, and client retransmits it.
if this is the case, then I assume loss rate means %of data lost at the receivers end. so if I define loss rate at client side in file mode, since it is never the receiver, it shouldn't drop or retransmit anything
is this understanding correct?
Q136.The Requirements say that "The shell must print the background job number and process ID in the format: [job_number] process_id"
But the test uploaded on moodle expects only "Hi There!" output, no job notifications. My shell prints "[1] 8824
Hi There!". So what should I do ?
Q137. How is command_name defined in Part D and E? like for sleep 5 & should the output be sleep with pid 50000 exited normally
or
sleep 5 & with pid 50000 exited normally?
If it is the former, then in Q88, shouldn't the output be:
ls | grep with pid <pid> exited normally?
Q138. If there are no foreground processes running, should the shell terminate on Ctrl-C and Ctrl-Z ?
Q139. Is it fine if in the schedulers part for xv6, we always run our scheduler on just 1 CPU? and make the log files accordingly?
Q140. `reveal -la > file1.txt file2.txt` If "file2.txt"
Q141. When in `--chat` mode betweent the server and the client, so we have to buffer packets to handle packets lost?
Q142. 
Is this number fixed for each sender-receiver pair OR for each sender OR for each receiver?
Q143. [Extension of Q122.] For example, if my input is
cmd 1 | log execute 2 | cmd 3, then how should the log function work?
a) cmd 1 ; [command exected by log] ; cmd 3
b)Nothing stored since input contained valid log function
c)cmd 1 ; cmd 3
d)cmd 1
cmd 3
(as separate entries)