Search Results

Search: Posts Made By: sumitgarg
17,918
Posted By sumitgarg
i would rather use lsearch
i was trying to understand if (and how) that can be done with 'regexp'?

Otherwise,

lsearch -exact $str1 $var1

does the job pretty well.

% set var1 {a[1]}
a[1]
% set var2 {aa[1]}
aa[1]...
17,918
Posted By sumitgarg
doesn't look right to me
Can you explain 'How it works?'?

It doesn't seem right to me.

% set var1 {a[1]}
a[1]
% set str1 {a[1] is the element i want to match}
a[1] is the element i want to match
% regexp $var1...
17,918
Posted By sumitgarg
tcl: regexp matching special character
Hello Experts,

Can someone help me here:

I have a variable which contains a string with "[]".

set var1 {a[1]}
set str1 {a[1] is the element i want to match}

Now "regexp $var1 $str1" does...
1,573
Posted By sumitgarg
thanks.. should have googled it... :)
thanks..
should have googled it... :)
1,573
Posted By sumitgarg
Help with Tcl...
Hello Tcl Experts,


set i 0

while { $i < 10 } {
puts "$i"
incr i
}

I am trying to print the value of "i" at the same place. i.e. it should first print "1", then in next iteration print...
Forum: What is on Your Mind? 06-20-2007
4,007
Posted By sumitgarg
ha ha
cool one... :)
3,304
Posted By sumitgarg
two ways to do this....
one is:

set fhndl [open "filename" r]
gets $fhndl line
while {$line != ""} {
puts $line
gets $fhndl line
}
close $fhndl

other is:

set...
2,597
Posted By sumitgarg
it works!
it works!

Thanks a lot! :)
2,597
Posted By sumitgarg
query file name
Experts,

New Year Greetings to everyone!

Is there a way I can query the filename from the file itself?

I am writing a bunch of similar 'csh' scripts, which differ by the file name and same...
2,130,261
Posted By sumitgarg
Thanks
Thanks ssk!

Your solution is so simple and so effective!


Thanks,

Sumit Garg
9,704
Posted By sumitgarg
attention moderators!!!
This'll work but my requirement is a bit complex.

As mentioned in my first mail, my script is like:

<some commands, variable settings, scripts>
rlogin different_server
<some commands,...
9,704
Posted By sumitgarg
rlogin inside a c-shell script
Hi Forumers,

Sorry if it's really simple, but I couldn't find a way out. :(

I've to do something like this in a script (csh):

<some commands, variable settings, scripts>
rlogin...
95,448
Posted By sumitgarg
Thanks a lot. I did rm filename 2>&...
Thanks a lot.

I did

rm filename 2>& /dev/null

and it was working too.

Thanks.
95,448
Posted By sumitgarg
Hello, Is there something similar in csh. ...
Hello,

Is there something similar in csh.

Am doing:

?> rm filename
filename: No such file or directory

How to suppress this message???
14,136
Posted By sumitgarg
Hi ZB, Cool Man!!! :cool: That was...
Hi ZB,

Cool Man!!! :cool:

That was easy, thanks a lot.

Regarding the duplicate mails, I'll keep that in mind next time.

Thanks,

Sumit Garg
14,136
Posted By sumitgarg
Hi All, Thanks a lot for your help. ...
Hi All,
Thanks a lot for your help.

I was able to do so by cut command. :p

[B]Million thanks to this forum. :)

Thanks,

Sumit
14,136
Posted By sumitgarg
Thanks a lot. But yes, I was specifically...
Thanks a lot.
But yes, I was specifically looking for some way in csh.
I know it's very easy in perl.

I think we can use "cut" command in csh to solve the purpose.
Anybody know about the...
14,136
Posted By sumitgarg
string to array
Hi Experts,
I'm new to Shell Scripting world and need a little help from you "Scripting Gurus".

I want to convert a string (entered by a user) to array in csh. I want something like...
Showing results 1 to 18 of 18

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