temporarily broken bash, need explanation
i was fiddling with some new commands i learned and typed something weird. Then bash broke on me for a while. here's the command i typed while in /bin
bash > less i believe i was in "sudo su" as the moment. i want to understand this because when I typed it bash didnt work. i tried to type "ls" after and it didnt result in anything. but thats not all it didnt receive any commands. Was this a crash? and why/how did it fix itself after i logged off. any info. would be helpful. Running: Linux [Gnome] |
No it did not crash. When you type bash in at a command prompt it will create a new instance of bash running on the terminal. The command bash > less will redirect the output for bash into the input for less. Since less will read so many lines from stdout and then wait for the user to hit a key to continue.
Because in essence you were then in less and less does not pass keyboard commands out to bash by default you had a terminal waiting for output from bash and no way to input anything into bash thus no output. You may have had a way to terminate less but I am not on a linux system ATM so I am not sure. |
Hi,
Let me man that for you; Quote:
Quote:
I suggest that you look at the following links to aid you for future use in understanding; Linux Documentation Project Rute Tutorial & Exposition Linux Command Guide Utimate Linux Newbie Guide LinuxSelfHelp Getting Started with Linux Bash Reference Manual Advanced Bash-Scripting Guide Linux Home Networking Virtualiation- Top 10 :hattip: The above links and others can be found at 'Slackware-Links'. More than just SlackwareŽ links! |
Quote:
krack3rz, bash is the underlying program that the terminal uses to run its operations. You don't need to run 'bash' from within the terminal; it's already running for you. A good reference to understand bash is here: http://www.gnu.org/software/bash/manual/bashref.html. onebuck, you'll need to change your Bash Reference Manual link to end in .html. It currently gets a 404 - Page Not Found. |
Hi,
Quote:
Fixed! |
Quote:
As geoff_f mentioned, running Code:
$ bash > less Code:
$ pwd Does this help clarify what you did? -AM |
Hi,
Quote:
:hattip: |
Quote:
Quote:
Quote:
|
Hi,
Quote:
I did not confuse the two characters but the OP did utilize the '>'. I posted excerpts for man 'bash' & the command 'less'. His redirect was faulty. I never addressed the '|' period. I did not confuse either. Your reading things into this. I've re-read what I posted so I feel what was presented is correct. As far as contribution, re-read what I said. I never said anything about the information that you presented to the OP. I was speaking of your contributions or comments to ME. You are mixing my posts with other members therefore confused and trying to justify. If you feel what I presented was misleading then point it out and I'll see if it can be clarified. I could have expanded but at the time was directly addressing the usage by the OP; Quote:
:hattip: |
Yeah don't let the wording of some responses seam to be harsh, they are probably not ment that way. Sometimes my responses I will write into them some whimsiclness and it may come off as me being an ass.
Anyway I was thinking of bash | less indeed not bash > less. |
All times are GMT -5. The time now is 09:00 PM. |