| Summary: | Bash history retrieves the wrong command | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Ted <r6squeegee> |
| Component: | bash | Assignee: | Roman Rakus <rrakus> |
| Status: | CLOSED WORKSFORME | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 14 | CC: | maxamillion, rrakus, tsmetana |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2011-02-14 16:54:58 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Ted
2011-02-11 01:11:05 UTC
Hmm, strange. It works for me. Is it reproducible for you? I can imagine only that your `cp' command you want is starting with some spaces. I know it is not shown here. You can watch your history and check if command you want really starts with `cp ' and not with any spaces (like ` cp'). it's not reproducible, although I haven't put much effort into trying. It's the first time I've seen such a thing. No there are no spaces in front of the cp command or anything weird. I've been refraining from using that option since then, I'll continue using it and if it comes up again I'll re-comment/re-open. This just happened again, can we re-open this? here's my command line paste again : --------------------- [1015:tedman@teds-t410:/data/repo/oscar/src/main/java]find . > /tmp/j.txt && !grep find . > /tmp/j.txt && grep I3817 /tmp/l --------------------- So it thought !grep == "grep I3817..." Here's my history list --------------------- 1009 ls 1010 find . > /tmp/j.txt 1011 grep -v \*.java /tmp/j.txt > /tmp/j1.txt 1012 more /tmp/j1.txt 1013 grep -v \.java /tmp/j.txt > /tmp/j1.txt 1014 more /tmp/j1.txt 1015 find . > /tmp/j.txt && grep I3817 /tmp/l 1016 history --------------------- Notice the grep command isn't the previous one, nor even the prior grep, if I do a history | grep grep, I get --------------------- 942 grep I3817 /tmp/l 1011 grep -v \*.java /tmp/j.txt > /tmp/j1.txt 1013 grep -v \.java /tmp/j.txt > /tmp/j1.txt 1015 find . > /tmp/j.txt && grep I3817 /tmp/l --------------------- Notice it's a command from way back, not even the same day. I noticed in both cases I was doing a command && !history, maybe that has something to do with it? |