Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hallo,
I'm trying to execute a file sh, but I have a problem because when I type in my shell
sh nome.sh
I have an error message because it can't find the 'setenv' command.
I looked in a forum and I have found that it happens because I'm using a bash shell, instead my sh file is for a csh shell.
So, how can I execute that file?
By running it like "sh nome.sh" you are explicitly saying to run the script using bash in sh compatibility mode. Instead either use "csh nome.sh" or use "./nome.sh" and rely on the slash-bang line to change the shell used.
While the extension isn't important in Linux, using sh is confusing. Change the extension to .csh. Look in /etc/profile.d; you may find a number of .sh and .csh files. The .sh files are bash scripts while the .csh files are csh scripts.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
ANSA CAE software??
To make a './' command you will have to 'cd' into that directory.
There is a reference to a '${ANSA_EXEC_DIR}bin/ansa_linux$...' command in chapter 15
here: http://www.virtualgl.org/vgldoc/2_0_1final/
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
http://www.ee.surrey.ac.uk/Teaching/Unix/
quote from tutorial 1:
'The current directory (.)
In UNIX, (.) means the current directory, so typing
% cd .
[NOTE: there is a space between cd and the dot]
means stay where you are (the unixstuff directory).'
More questions? Please inform which application you are using.
I think that SuSE has the csh shell already installed. If not, install it from the package manager.
Try the "chsh" command to change your current shell. (see "man chsh")
Also, did you look at the first line in the script you are trying to run? That will verify whether the script used the chsh.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.