Ksh script function, how to "EXIT 2" without killing the current process?
Hi,
Using AIX 5.3 and Ksh.
I recently started working for a new employer. I have written UNIX K-Shell scripts for many years and have never had this particular issue before. Its perplexing me.
I have the following script:
When I execute this script from the command line list this:
the EXIT command ends my current Telnet session.
So, I added a line at the top:
It still ends my Telnet session even though (I thought) #!/usr/bin/ksh should be telling the script to execute in a new shell process. RIGHT?
So, I tried changing the line at the bottom which calls my function to fork a new proces.
Then when I run my script again...
PATH Environment Variable:
Directory listing where script resides:
I appears my script directory isn't even in the PATH and yet I can execute the script from anywhere. I don't get it. My co-workers say it has always been this way.
Anyway, it appears that running the script like this is causing my "\n" to stop working. And, what is the "not found" message? Am I doing something wrong?
I've never had problems creating scripts which execute in a new shell and have the EXIT command work as expected without strange results.
Possibly, our shell is different or some OS setting is different than previous environments I've worked in?
Dear friends,
please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories..
it is like this,
current directory contains
file1, file2, file3, dir1, dir2
and dir1 conatins
file4, file5
and dir2 contains
file6,... (9 Replies)
I have a script that performs an oracle export:
<snip>
if
then
exp / full=y file=${exp_file} log=${exp_log} direct=y feedback=1000000 STATISTICS=NONE buffer=20000000
else
exp / full=n owner=${schema_name} file=${exp_file} log=${exp_log} direct=y feedback=1000000... (4 Replies)
Hi,
I have small script written in korn shell. When it is called from different script, its dumping core, but no core dump when we run it standalone.
And its not dumping core if we run the script using "/bin/sh" instead of "ksh"
Can some body please help me how to resolve this issue.
... (9 Replies)
Hi All,
This is an embarrassingly simple question and couldn't think of "keywords" to search for the answer, but how do I change my UNIX/KSH prompt to show the machine name and my "current" but not "full" directory?
For example: if the machine name is "machine" and I'm currently in... (4 Replies)
If I enter (simplified):
find . -printf "%p\n"
then all files in the output are prepended by a "." like
./local/share/test23.log
How can achieve that
a.) the leading "./" is omitted
and/or
b.) the full path to the current directory is inserted (enclosed by brackets and a blank)... (1 Reply)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)