The problem is solved. Explanation:
The /data disk is encrypted. When the computer is booted up, first I must open encrypted disc from the terminal. When the /data disk is open, the PATH not works even the /data/LHData/bin is readable now!
I must run rehash or quit terminal and open again.
You must have a very old version of tcsh, that Word too long limit was removed in tcsh version 6.14.03 in 2006.
Would pass the concatenation of the array elements to echo as one element but fail if any contain a newline character.
would be more correct to pass the concatenation of all elements.
To pass all the elements of ...
You won't be able to do that nicely.
In tcsh, $_ always fetches the content of the input buffer (empty in a non-interactive shell), and there's no way to override it.
This kludge may work (ymmv):
set lastline = 'source sourceme.csh'
sed 's/\$_\>/$lastline/g' sourceme.csh | source /dev/stdin
Unlike bash, dash, etc tcsh will run the right side of a ...
The error is caused because the string that you get is not the name of the directory, instead a string that contains some info about the directory like drwxrwxr-x. 3 alessiosavi alessiosavi 4096 Sep 10 09:51 workplace-tmp and not your target name that is workplace-tmp
For accomplish the work, we can run the following step:
1. Save the last directory in ...
$(...) is Korn/POSIX shell syntax. Command substitution in (t)csh is done with `...`.
In tcsh, you could do:
set dirs = (./*/); cd $dirs[$#dirs]:q
To cd into the last directory (or symlink to directory) in a lexically list of non-hidden directoties in the current directory.
That is better than:
cd "`ls | tail -n 1`"
Which wouldn't work if there were ...