Hi all, I tried both of your suggestions and they both work fine however, now my inside loop does not work. It seems that the
if $2>=2; then
echo "$9 has $2 links."
else
echo "$9 has one link>"
goes looking for agruments in the command line. so the...
hi all
i just have a quick question.
i am writing a script that will check the number of links for each file in the user's directory and output the appropriate message.
here it is:
#!/bin/sh
ls -l >outputfile
HERE IS MYQUESTION: how do I loop through each line of the file outputfile
for...
ok,
So basically they provide faster access to data because they do less comparisons. so istead of a long list you have several short lists. Ok I'll just need to practice using them. Thanks for the explanation.
Hi all,
Which version of bianry search is better? the forgetful version or the one that terminates as soon as the value is found.
Also , can anyone explain to me how comb sort works?
Thanks,
Hi all,
How do you clear a queue that is implemented in an array?
here is my tentative code below. Please give me some feedback. Thanks
void clearqueue (queueentry *x, queue *q)
{
while(q->front)
{
q->count--;
x*=q->entry[q->front];
q->front=(q->front + 1) % MAXQUEUE...
HOw can I make a square using just single dimensional array?
for example array[12]={1,2,2,3,4,5,6,4,5,6,9,12} would give something like: 1 2 2 3
4 5 6 4
5 6 9 12
I knom I need to use a for loop but can't get it to print it out correctly.
THanks a lot
Hi
I need to use the script below to make a script that concatenate 2 lists together so the input to the script will be colon or space separated lists and the output will be a single colon separated list with all redundant items removed.
I would appreciate any help and pointers to get me...
Hello,
How can I call a function that rturns a node?
Its declaration is ELE find().
I have
typedef struct Ele ELE;
typedef struct *Ele *ELE;
struct Ele{
char *adress;
char *name;
int id;
ELE *next.
};
Thanks you,
Hi all, I wrote this script (prog3a) that replaces all of the occurences of a search-string with the replace-string in the file specified on the command line. the sed command should send the output to a temp file , then the temp file is moved to $file.keep. when i run the script I get the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.