Search Results

Search: Posts Made By: dixits
4,684
Posted By dixits
Thank you so much. This is what I was looking...
Thank you so much. This is what I was looking for.:)
4,684
Posted By dixits
Unfortunately the error message which i get is: ...
Unfortunately the error message which i get is:

argv: Subscript out of range
4,684
Posted By dixits
Thank you for your response. I guess this...
Thank you for your response. I guess this partially work, but I was more looking for an error prompt to the user like:

cluster_on_lev3.csh -dir /home/shared -t 2.3 -p 0.05 -c26 -l2
"Incorrect...
4,684
Posted By dixits
Hi, Sorry about this but I didn't receive any...
Hi, Sorry about this but I didn't receive any script from you. Pardon me if I have missed something in your email.
4,684
Posted By dixits
The way it works is: Example: If the user...
The way it works is:
Example: If the user types:
cluster_on_lev3.csh -dir /home/shared -t 2.3 -p 0.05 -c 26 -l 2"
The above code checks for arguments such as -dir, -t, or -c in the Case statement...
4,684
Posted By dixits
The whole code is: #!/bin/csh if (${#argv}...
The whole code is:

#!/bin/csh
if (${#argv} < 1) then
USAGE:
echo "USAGE: cluster_on_lev3.csh -dir <full_path Lev3 gfeat cope directory> [options]"
echo "USAGE: cluster_on_lev3.csh...
4,684
Posted By dixits
Check for spaces in input argument!
Hi guys,
I have created a csh script which allows user to pass input argument with the script like:

cluster_on_lev3.csh -t <value> -p <value>
Example:
cluster_on_lev3.csh -t 2.3 -p 0.05
...
1,663
Posted By dixits
Use of sed to find everything after first match!
Hi Guys
So far I have got this to work:

set x = temp1:temp2:temp3

echo $x | sed 's/.*:\(.*\).*/\1/'
Answer:
temp3

But I want answer as temp2:temp3, that is everything after the first ":"...
1,572
Posted By dixits
"set variable with spaces and apostrophe after s"
Hi Guys,
I have a variable such that:

set x = (Session,Date,Type,Receive Coil Name,Manufacturer,Manufacturer's Model Name)
foreach i ($x)
echo $i
end
I would like to read each variable one by...
1,445
Posted By dixits
---------- Post updated at 10:50 AM ----------...
---------- Post updated at 10:50 AM ---------- Previous update was at 10:49 AM ----------




---------- Post updated at 10:54 AM ---------- Previous update was at 10:50 AM ----------
1,445
Posted By dixits
Specific search using sed!
Hi Guys,
I need to grep a specific string between a pattern. I have used sed command in the past in the following fashion:

set x = ROI_2_AND_mod_AND_name
echo $x | sed...
1,142
Posted By dixits
Thank you all for you help.
Thank you all for you help.
1,142
Posted By dixits
Help with formatting file in C shell!
Hi Guys,
I have written a matlab script that does, thresholding of the data and creates a single column of data which i save as a text file in my home directory. Now would like to format that text...
1,119
Posted By dixits
This is a small part of a long code written in c...
This is a small part of a long code written in c shell. My task is to modify this part. I am slowly shifting to bash but this part requires me to modify the code in c shell.

---------- Post...
1,119
Posted By dixits
Creating an array with options as an argument!
Hi Guys,
I am writting a c shell script where I have to parse an input argument with options that could be an array. So far I have achieved where I could parse a single argument with option but...
1,067
Posted By dixits
square every element in text file!
Hi Guys,
I have text file containing multiple rows and multiple columns. I wrote a script which gets the sum of every row like:
which looks like
1 0 3 4
2 9 8 2


cat temp.txt | awk...
11,038
Posted By dixits
Thanks, It works now. Infact I had to use sed to...
Thanks, It works now. Infact I had to use sed to insert one more back slash that is replace "\" by "\\" to make it look like set x = 0.314\\0.314.

set x = `command input | sed 's/\\/\\\\/g'`
...
11,038
Posted By dixits
The "double \\" works with floating point numbers...
The "double \\" works with floating point numbers which are greater than 1 but doesn't work for numbers between 0 and 1. Try:

set x = 0.314\2.314
echo $x
0.3142.314

I think I have to accept...
11,038
Posted By dixits
Example: linux1% command input Correct o/p: ...
Example:
linux1% command input
Correct o/p:
0.48828125\0.48828125
But I want to save this variable using set in c shell and I am doing:
set x = `command input`
echo $x
Incorrect o/p: ...
11,038
Posted By dixits
Yes, You are absolutely correct that this kind of...
Yes, You are absolutely correct that this kind of operation doesn't work in bash also.

xxx@linux1% command --i input [option]
o/p
0.48828125\0.48828125
What I tried was:
xxx@linux1% set x =...
11,038
Posted By dixits
Floating Point Numbers in c shell!
I have started using bash but this script which I am working on it, is in c chell. So here is my simple problem:

set x = 0.4124\0.234
echo $x
0.4124.0.234

Same operation in Bash gives me...
956
Posted By dixits
Thanks to all of you for your great replies . It...
Thanks to all of you for your great replies . It works now.
956
Posted By dixits
Problem using sed
Hi Guys,

I have been using sed command to find anything between double quotes. But I also have to incorporate something that first checks for single or double quotes and accordingly sed command...
7,767
Posted By dixits
Yes but it didn't work. when I try single...
Yes but it didn't work.
when I try single quotes and do echo $x it says:
echo : No match.
The problem is the square brackets because when I remove the square brackets it works just fine.
7,767
Posted By dixits
set variable with square brackets in c shell!
Hi Guys,
I want to set a variable which happend to have square brackets in them. I tried multiple ways that is by escaping it with quotes (both single and double ) but it didn't help.
All I want...
Showing results 1 to 25 of 55

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