101 reputation
1
bio website
location
age
visits member for 2 years, 8 months
seen yesterday

May
2
comment Any way to recover list of open terminal tabs/windows before my system went down unexpectedly?
Yeah, gnome-terminal. OK, that's too bad. Thanks!
May
2
awarded  Editor
May
2
comment Any way to recover list of open terminal tabs/windows before my system went down unexpectedly?
I'm using scientific linux (SLC5) and bash. I don't need full session saving, just any way of figuring out what directies I was in prior to the crash.
May
2
revised Any way to recover list of open terminal tabs/windows before my system went down unexpectedly?
added 74 characters in body
May
2
asked Any way to recover list of open terminal tabs/windows before my system went down unexpectedly?
Apr
1
comment Is it possible to reference the most recently modified file in a command line argument?
Works now. Thanks a lot!
Apr
1
comment Is it possible to reference the most recently modified file in a command line argument?
@jw013 OK, this tells me that some of the aliases I have turned into functions are not taking arguments! For example: function cdtest () { cd } When I run "cdtest Downloads/" on the command line xtrace shows that only the command "cd" is run. On the other hand another function: function e() { emacs } Does work on when given arguments on the command line!!?? Is the difference that 'cd' is a bash builtin? But in either case xtrace shows the last_file () given the command 'e' or 'cdtest' runs only 'emacs' or 'cd' without the argument given to it.
Mar
31
comment Is it possible to reference the most recently modified file in a command line argument?
@jw013 Actually, it still doesn't work correctly. If I give the last_file () function a function as a command, it doesn't run it. The function exits fine, and correctly finds the most recent file, but it does not run the command I give it. I can't figure out what is going wrong :( ... you might want to just try it out yourself, as the copy-paste job will only take a sec.
Mar
31
comment Is it possible to reference the most recently modified file in a command line argument?
@jw013 Thanks, I read somewhere else that that is a good idea, so I'll do it, even though I have a lot of aliases :)
Mar
31
comment Is it possible to reference the most recently modified file in a command line argument?
@jw013 Hmm, still the exact same behavior; it works but doesn't recognize aliases (I did source my .bashrc don't worry). ETA: I made a test script: alias echohello="echo hello"; function test() { echohello }, which works fine. So it has something to do with how your script handles input
Mar
31
comment Is it possible to reference the most recently modified file in a command line argument?
@jw013 Sorry to ask (I'm a novice) but, how would you convert the script into a function so that it will recognize your aliases, etc? I tried: function last_file { source ~/scripts/last_file.sh } At the end of my .bashrc, but aliases were not preserved.