Bash source code troubles (where is the main input/output file, where does it actually scan input and give output)

gronk

New Member
Joined
Oct 9, 2023
Messages
7
Reaction score
1
Credits
46
basically the title. any help would be appreciated
 


input from where? Output to where?
What have you tried so far?
 
input from the user, e.g ls, output from the command, e,g. [my folders]
i've tried manually looking through the files, though nothing seems to catch the eye. i think the most likely answer is execute_cmd.c, but to be honest it's a 3.7k line file and i'm a bit daunted by it

edit: after further inspection i'm not sure that's the right file
 
Last edited:
i feel the need to specify that this is the bash terminal, not the scripting language
 
input from the user, e.g ls, output from the command, e,g. [my folders]
i've tried manually looking through the files, though nothing seems to catch the eye. i think the most likely answer is execute_cmd.c, but to be honest it's a 3.7k line file and i'm a bit daunted by it

edit: after further inspection i'm not sure that's the right file
Since you are looking at the source code for your answer, I guess you may have accessed all of it already. In case not, it's here: http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz.

If you can't find the answer you are after reading there, a good place to ask such a technical question on bash would likely be the bash mailing list which runs at GNU.org since bash is a GNU utility, and that can be found here: https://www.gnu.org/software/bash/
 
Last edited:
Since you are looking at the source code for your answer, I guess you may have accessed all of it already. In case not, it's here: http://git.savannah.gnu.org/cgit/bash.git/snapshot/bash-master.tar.gz.

If you can't find the answer you are after reading there, a good place to ask such a technical question on bash would likely be the bash mailing list which runs at GNU.org since bash is a GNU utility, and that can be found here: https://www.gnu.org/software/bash/
this is very useful, thanks
 
Mate, you can't expect a random developer around the world to get back to you in less than 7 hours, and then come here expecting us* to know more than them.

If you have the source code, why don't you compile it with debugging symbols? If you do it and stop it in the first breakpoint you can place, you can always look at the heap to see where the execution comes, and trace it back to the input.

[*]: although this forum has "linux" in its domain name, this is not the forum of the Linux developers --this is just a community of users.
 
Mate, you can't expect a random developer around the world to get back to you in less than 7 hours, and then come here expecting us* to know more than them.

If you have the source code, why don't you compile it with debugging symbols? If you do it and stop it in the first breakpoint you can place, you can always look at the heap to see where the execution comes, and trace it back to the input.

[*]: although this forum has "linux" in its domain name, this is not the forum of the Linux developers --this is just a community
my bad, i was getting impatient
 
I'm guessing you haven't checked the bash source code, because your answers are in the files input[.c,.h] for the input, and the output can be traced from execute_cmd[.c, .h].
 
I'm guessing you haven't checked the bash source code, because your answers are in the files input[.c,.h] for the input, and the output can be traced from execute_cmd[.c, .h].
wait really? i was incredibly tired last night when i checked over them (and made this post) so i must have missed it. thanks for the help!
 

Members online


Top