Search Results

Search: Posts Made By: shira
5,341
Posted By shira
I didn't fix that problem then, I just did some...
I didn't fix that problem then, I just did some trick.
And in this case, I couldn't do that trick.
You probably missed what I wrote - I wrote that this time the parameter comes from a file and not...
5,341
Posted By shira
well, I use word and number in the main script....
well,
I use word and number in the main script.
in the main script I have an if->while loop, and then I send ${word[$i]} and ${number[$i]} to the subscript.

like that:

if () then
bla bla...
5,341
Posted By shira
Hi, thank you all! 2pugs, your message...
Hi,

thank you all!

2pugs, your message really helped me.
The only thing is that you need to switch between the pipelines.
It should be:

set number = `grep "[0-9]" ${1}|cut -d" " -f1`
set...
5,341
Posted By shira
How to skip lines which don't begin with a number
Hi,

I have a file:
file.txt

1 word
2 word
word
word
3 word
4 word

and I would like to create a set:
set number = `cut -d" " -f1 ${1}` #${1} is the text file

but it should only...
4,323
Posted By shira
Hi frans, I tried this solution, but it...
Hi frans,

I tried this solution, but it didn't work for me.

Thanks,
Shira.
4,323
Posted By shira
2pugs, It worked, thanks so much, you're the...
2pugs,

It worked, thanks so much, you're the best. :)

Shira.
4,323
Posted By shira
ok, I tried a little test, and I discovered that...
ok, I tried a little test, and I discovered that it changes parameter during the condition of the if. very strange.
Here's the code:


set parameter = ${3} #${3} is the string
echo "$parameter"...
4,323
Posted By shira
ok, I discovered the problem, but it's very odd. ...
ok, I discovered the problem, but it's very odd.
At the beginning of the script I defined parameter.
I echoed it right after the definition and it was okay.

I echoed it right before the if like...
4,323
Posted By shira
Hi, I'm using csh. It doesn't give me an...
Hi,

I'm using csh.
It doesn't give me an error message, it just calculates it as FALSE instead of TRUE and then goes to the "else" section.
4,323
Posted By shira
Hi, I tried it as well, but it just doesn't...
Hi,

I tried it as well, but it just doesn't work. :/
4,323
Posted By shira
How to compare a parameter to a string
Hi,

I have a parameter which is a string:
set parameter = "string"

I would like to compare it to various strings inside an IF conditional:

if ($parameter == "string") then
bla bla...
9,956
Posted By shira
Hi, I just found out what was my problem: ...
Hi,

I just found out what was my problem:
I needed to add "./".

So the correct answer is:

@ param1 = `./script2 $param1`

Thanks for the patience and the help,
Shira. :)
9,956
Posted By shira
Hi! Thanks for the reply! Actually I'm not...
Hi!

Thanks for the reply!
Actually I'm not using perl but csh.

The files are in the same path.

I actually did this kind of thing once, but I forgot how to do it.
But I'm sure that it...
9,956
Posted By shira
How to return a value from another script
Hi!

I have a parameter in an existing script, let's call the parameter param1 and the script - script1.

I have another script - script2, which receives param1 and returns a certain value.

I...
2,175
Posted By shira
Hi Jim! Now I see what you mean. I changed...
Hi Jim!

Now I see what you mean.
I changed the opening of my script to just
#!/bin/tcsh -f

and now it works.
I had it in mind, but I've never thought it was the reason.
I guess it was...
2,175
Posted By shira
the output is: /bin/tcsh thanks, ...
the output is:

/bin/tcsh

thanks,
Shira.
2,175
Posted By shira
Of course, I've written many scripts in this...
Of course, I've written many scripts in this environment.

I'm using a different computer now, and I know that it doesn't mean anything, but if it helps, the previous computer had windows xp os and...
2,175
Posted By shira
Script doesn't run
Hi everyone,

I've written a script, I gave it permission by
> chmod u+x myscript

and then tried to run it with
> myscript

and it didn't work, so I've written
> ./myscript

again, it...
2,299
Posted By shira
Hi, thanks! Is there a version withour nawk?
Hi, thanks!
Is there a version withour nawk?
2,299
Posted By shira
How to search a number in a certain field
Hello,

I have a file that looks like this:


num11 num12 num13 word1
num21 num22 num23 word2
num31 num32 num33 word3
.
.
.


I would like to search for the lines that contain a...
7,037
Posted By shira
Hi cfajohnson, it was a typo, I cleared it...
Hi cfajohnson,

it was a typo, I cleared it out in the beginning of thread.
Anyway, I already fixed that problem, I blamed cat for nothing.
The problem was that I should've written this segment...
7,037
Posted By shira
OK, I fixed it! It wasn't a syntax problem....
OK, I fixed it!

It wasn't a syntax problem.

This is what I did:
I have a main script which creates a file. This file needs to create another file which is being "built" in a secondary...
7,037
Posted By shira
Hey Nixnoob, it's not working. And you're...
Hey Nixnoob,

it's not working.
And you're not supposed to put -u and -d at the same time, it's sort of a rule.

and I tried everything you said...

more didn't work, but what's the difference...
7,037
Posted By shira
I'm creating file1 and file2 in the same script. ...
I'm creating file1 and file2 in the same script.
although in order to create file1 I used a different script.
But this part works fine.



No...
Actually there are some, but they have no...
7,037
Posted By shira
But you know what's strange? That the original...
But you know what's strange?
That the original file doesn't even look like that!
The cat command adds and doubles lines!
The original file looks like this:

file1:
------
246 12 egged
468 -1...
Showing results 1 to 25 of 53

 
All times are GMT -4. The time now is 02:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy