117 reputation
10
bio website
location
age
visits member for 2 years, 5 months
seen Dec 12 at 11:34

I am here to learn and learn until I become fit enough to teach.


Feb
28
comment Get the last executed command line in ksh
Fantastic, Stackexchange's Unix site was missing you for so long. Thank you for coming in to get us better.
Feb
28
comment Get the last executed command line in ksh
the statement within the function would know that the last statement was the function call itself. I am curious to know whether this understanding it right.
Feb
28
comment Get the last executed command line in ksh
"Generally speaking, in a script, you can always know the last line, anyway ;)" - I dont understand how can we know the last line, am I missing something big and fundamental here?
Nov
11
comment What is the “initialization time” in the find command?
@slm Apologies for not mentioning that it is AIX 6.1.
Nov
1
comment What does readonly mean or do?
run it and see it.it will help you for sure in the long way.
Oct
4
comment Get the last executed command line in ksh
"As pointed to by Lee in unix.stackexchange.com/a/27513/20291 , hist might be useful , but is available only with ksh93 , which I may not allowed to use." just to point this statement that was part of my original question.
Oct
4
comment Get the last executed command line in ksh
@glennjackman thankyou. fc is an alias for hist only in ksh93, we use a version older than that.
Oct
4
comment Getting the complete command line that caused an ERR , while trap
I am sorry that I should have mentioned the shell as ksh.$BASH_COMMAND works well for bash.
Oct
4
comment Getting the complete command line that caused an ERR , while trap
This works perfectly for bash, but I am using ksh. I tried the above idea with ksh , replacing history 1 with fc -nl -1 inside my ksh script, but it said "fc: history functions not available" , which I ll post as a separate questions.But, this answer is right.
Oct
1
comment Scoping variables in ksh
thank you. I went through that link before, stumbled on namespaces and compound variables, trying to figure out how could it solve my problem.
Oct
1
comment Scoping variables in ksh
Allow me to be dumb to ask this question, whatever ksh has , is it derived or adapted from zsh?
Sep
30
comment Scoping variables in ksh
@dchirikov , Thank you. Currently I am using two seperate variables, prepending the local var name with a L.but I don't like it :). I am looking for something equivalent to a namespace or that sort as we have in C++.
Sep
26
comment input output redirection in bash
unix.stackexchange.com/a/89388/20291 points to a nice article on redirection.
Sep
25
comment input output redirection in bash
awesome. wondering why the documentation says out of &>fname and >&fname , the former is preferred. Thanks a lot of pointing me to the right documentation.
Sep
24
comment Variable name completion in ksh
My problem is , I am put into a learning window where I am asked to get trained in KSH with the limited resources that I have, in this case cygwin :).
Sep
23
comment Restoring output to the terminal after having issued “exec &>filename”
@MartinvonWittich I agree with the statement on exec. I agree. I am just a kid playing around :)
Sep
23
comment Restoring output to the terminal after having issued “exec &>filename”
Thank you Joseph. I posted this question before looking at Giles' answer. Thank you very much. Please allow me to mark Giles answer as accepted, for it made even dumb minds like mine to understand properly.
Sep
23
comment Restoring output to the terminal after having issued “exec &>filename”
as @Joseph R. answered $(tty) shows me /dev/pty0 , but your command too works, which one is more portable across Unix flavors? thank yo u for the more clear answer.
Sep
23
comment Restoring output to the terminal after having issued “exec &>filename”
it works! Thank you. echo $(tty) gives /dev/pty0 ( in cygwin) ,how is it related to stdin,stdout and what happens with the above statement? please do let me know if I need to ask this as a seperate question.