cd /lkjsdf ; source junk.1 logs me off!

Issues related to applications and software problems
Post Reply
homerwsmith
Posts: 19
Joined: 2012/12/12 18:47:45
Contact:

cd /lkjsdf ; source junk.1 logs me off!

Post by homerwsmith » 2019/07/06 20:08:35

Dear Gentle Folk,

I thought I knew unix/bash etc.

The compound statement

USING TCSH!

cd /lkjsdf ; source junk.1

completes and then logs me off IF the cd directory does not exist. It works fine if the
directory does exist. Why is this and how do I fix it.

It doesn't matter what is in junk.1, nothing will do.

cat junk.1
echo hello

cd /root ; source junk.1
hello

cd \xoot; source junk.1
/xoot: no such file or directory
hello
Connection to vm2 closed.

Thanks in advance
Homer W. Smith
CEO Lightlink.com

chemal
Posts: 776
Joined: 2013/12/08 19:44:49

Re: cd /lkjsdf ; source junk.1 logs me off!

Post by chemal » 2019/07/07 22:28:41

That's an interesting bug not present in el6. If you start start a second tcsh before entering the command sequence, you get this:

Code: Select all

> tcsh
> cd /lkjsdf ; source junk.1
/lkjsdf: No such file or directory.
hello
Aborted
If you want this fixed you should report it to RH. You should also check how the current upstream version of tcsh behaves.

homerwsmith
Posts: 19
Joined: 2012/12/12 18:47:45
Contact:

Re: cd /lkjsdf ; source junk.1 logs me off!

Post by homerwsmith » 2019/07/29 23:36:40

Kudos to someone who actually knows what I was talking about.

Thanks Homer

Post Reply