You need to call it like this: ---------- Post updated at 11:53 ---------- Previous update was at 11:45 ----------
You need to always escape the * on the command line to avoid expansion by the shell.
In the script, instead of using expr you can do this:
then you do not need the inside the arithmetic expression and you are using a shell builtin, which is faster.
In this case you could even do this:
but that is probably not what you are after
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.
Please review the rules, which you agreed to when you registered, if you have not already done so.
More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.
Hi,
I have an array variable "arr" that reads string from a file "vari.txt". Thus, the array will be of variable length depending how many entries are present in "vari.txt"
I use a for loop to traverse through the array.
However, i need a grep command to grep for a file "output.txt" and... (3 Replies)
hello,
i'm trying to get some deeper view into the shell. at the moment I have following problem with the bash:
I read some numbers via some awk scripts
A=`awk '/id="identifier/ {......}`
which works fine,
then I want to make an if statement whth some calculations. but then it does... (4 Replies)
Hello,
Actually I am not sure how to ask this question, which is about the technique advance on website construction/design. Compared with HTML/CSS, which ones are the most popular for website construction? My colleague recommends Drupal for Linux platform. Any other? Thanks!
Yifang (4 Replies)
I am trying to construct a regular expression that will filter a log file containing the following table:
aP
mP
mC,mI
oP
oC
oF
oI
tP
tI
hP
... (8 Replies)
Hi
I have to construct a rectangular matrix with 6012 rows and 2221 columns.
Here the rows and columns were given by alphanumeric ids in a file named row.txt and column.txt respectively. with this row nd column ids I have to construct a matrix ie 6012*2221 and compare the column ids with... (0 Replies)
Could someone please help, I am new to unix and I am trying to do the following:
o Each password must have at least eight characters.
Only the first eight characters are significant.
PASSLENGTH is found in /etc/default/passwd and is set
to 6.
... (1 Reply)