Show Posts. Registered User. Join Date: Jul Which site can I use? Kindly help!! Thank you in advance! Join Date: Apr Neo asked to start a new thread for new question. Not for the same question your new question is related to the alias command. Join Date: Sep If you describe on what you wish to do your learning, perhaps we could help: Is it a server? Giving the model would speed up things Do you have a tape device?
Join Date: Dec You will also need a software license for HP-UX. I will tell you! Join Date: Mar I can't think of any sensible way of achieving this download.
You need some suitable hardware, the release media, and a licence from HP. Sorry, HP-UX is not public domain software. I have some HP-UX operating system installation cd's and dvd for several versions. Join Date: Feb I don't know anything about HP-UX, but is bash installed? Check whether bash is installed Code :. Code :. Join Date: Dec Bash is not installed on HP-UX by default. Also bash is not officially supported, you will not get help from HP Support if problems with it arise.
If it is anything else you could make your system unbootable. Join Date: Mar What version of HP-UX do you have? No version of HP-UX comes with "bash". Depending on your version there are ways to get the source and compile it. In every release since HP-UX See "man sh" for the list of standard shells.
Need to make setup to work like Linux. Best way to get a bash script working in C. Ahoy friends. Currently i got a bash script running to manage my minecraft servers.
Using my script im able to start a server e. Bash - command substution not working. For some reason I cannot use command substitution in my bash shell in Fedora. Shell Programming and Scripting. Working with grep and Bash. Hi, I am currently working on a Bash shell script that - Downloads a webpage, in this case youtube. Bash is not installed on HP-UX by default. Also bash is not officially supported, you will not get help from HP support if problems with it arise.
In this case you get a message. In case you need to compile it run-time dependencies are: gettext libiconv termcap, but for most version of HP-UX depots are available.
Here is direct link: bash These are links on this page! Download and install with swinstall. HP-UX nti B. Bash v4. This type of for loop share a common heritage with the C programming language.
BTW, where did you read that it was 3. I ask because you may know some good website of interest on the subject. You code is missing the increment. Anyway, at least one of them may be right… ;-. I use several computers, some of which have non-US settings with comma as a decimal point. Is there a way to force the first variant, regardless of the language settings? Can I, for example, set the keyboard to US inside the script? I am sending these as parameters to another code and it won't accept numbers with commas….
Interestingly, the sed command does not seem to be upset by me rewriting its variable. If a given filename is not modified by the expression, it will not be renamed. If no filenames are given on the command line, filenames will be read via standard input. If you set the shell option extglob, Bash understands some more powerful patterns.
Here, a is one or more pattern, separated by the pipe-symbol. Matches anything except one of the given patterns. Then you might want to consider using [ nullglob ] shell extension, to prevent this. And, again, as stated many times up there, using [seq] is counter productive, because it requires a call to an external program, when you should Keep It Short and Simple, using only bash internals functions:.
By the way, this historical recall should be placed only at topic end, and not on top of the topic, which makes newbies sticking to the not-up-to-date technique ;-.
I have a comment to add about using the builtin for … syntax. I would agree the builtin method is cleaner, but from what I've noticed with other builtin functionality, I had to check the speed advantage for myself.
I wrote the following files:. And here were the results that I got: time. The performance increase isn't too significant, especially when you are probably going to be doing something a little more interesting inside of the for loop, but it does show that builtin commands are not necessarily faster.
The reason why the external seq is faster, is because it is executed only once, and returns a huge splurb of space separated integers which need no further processing, apart from the for loop advancing to the next one for the variable substitution. The check expression is re-evaluated on every iteration, and a variable on the interpreter's heap gets incremented, possibly checked for overflow etc.
Note that the check expression cannot be simplified or internally optimised by the interpreter because the value may change inside the loop's body yes, there are cases where you'd want to do this, however rare and stupid they may seem , hence the variables are volatile and get re-evaluted. Point being that it gets executed only once and becomes static. TheBonsai wrote….
I am not certain it is in Posix. Not Ksh, Bash, or anything else. Bourne Shell syntax works everywhere! But as 'expr' is a builtin in more modern shells, then it is not a big loss or slow down. This is especially important if writing a replacement command, such as for "seq" where you want your "just-paste-it-in" function to work as widely as possible.
I have been shell programming pretty well all the time since , so I know what I am talking about!
0コメント