Search Results

Search: Posts Made By: gaurab
6,476
Posted By gaurab
Hehe... it all boils down to choosing between the...
Hehe... it all boils down to choosing between the two evils then.

1. Do ssh to go directly to bash, but comment out the like that invokes "bash" in the .tcshrc EVERYtime I need to scp, or
2....
6,476
Posted By gaurab
Yes, it does.
Yes, it does.
6,476
Posted By gaurab
This works great but when I want to get something...
This works great but when I want to get something from the computer remotely using scp, it gets stuck. I mean, the scp command just hangs in there.


Any suggestion how to solve this issue?
6,476
Posted By gaurab
Thank you very much. That works like a charm. ...
Thank you very much. That works like a charm.

I have another question (maybe not very relevant). I want "open in terminal" option in the context menu in a folder in nautilus. I know it's possible...
6,476
Posted By gaurab
Opening a terminal with bash
Hi,

The computer that I use is on a network and has the exact same installation as other computers on the network (Ubuntu 10.04 LTS). When I open a new terminal window by default it opens a tcsh...
1,222
Posted By gaurab
The code I posted will work if you just go to the...
The code I posted will work if you just go to the top most directory and run it. It will read through all the sudirectories (the -r option for ls).

Let me know if you still have any trouble.
-G
3,774
Posted By gaurab
Hi Thibault, I use a lot of gnuplot too. Could...
Hi Thibault, I use a lot of gnuplot too. Could you please PM me (or post the link here, now that you have 5 posts) the link to the website you mentioned?

Thanks in advance,
Gaurab
1,222
Posted By gaurab
If you are searching in the current working...
If you are searching in the current working directory:
find . -iname *.chr01 | sed "s;^.;`pwd`;"

For concatenation, you don't have to use sed as you don't have to print the full path:
find ....
3,098
Posted By gaurab
"-r" is not a standard option. It allows one to...
"-r" is not a standard option. It allows one to use extended regular expressions like the one we are using above.

Sorry, I don't know how to do it using basic reg-ex.

You might find some help...
3,098
Posted By gaurab
Save file as: filename sed -r...
Save file as: filename


sed -r "s/^(.{12})(.{1})/\1/" filename | sed -r "s/^(.{17})(.{1})/\1/"


The first sed:
/^(.{12})(.{1})/ means select 1 ((.{1})) character that comes after the first...
2,818
Posted By gaurab
-k1,1 tells sort that: first sort the file...
-k1,1 tells sort that: first sort the file alphabetically using column 1 as the key. (1,1) means only use the first column.
The option just "-k1" would mean use the whole line as key starting with...
2,505
Posted By gaurab
Yeah. Generally, instead of command < (...
Yeah.
Generally, instead of
command < ( sort -k2,2 $FILE1 )

I write


sort -k2,2 $FILE1 > somefile
command somefile


So, basically, I would have written your code with 3 lines. So, I...
2,505
Posted By gaurab
Thanks drl, That's an awesome piece of...
Thanks drl,

That's an awesome piece of oneliner. I frequently use sort but have never used join before. From now on I am going to.
2,505
Posted By gaurab
Thanks royalibrahim and acmvillareal for your...
Thanks royalibrahim and acmvillareal for your time and effort. Now I have to spend some time to try and understand the codes.

@royalibrahim
This is already compact (I'll have to try to understand...
2,505
Posted By gaurab
Data file manipulation
Hi,

I have two, double column data files (file1 and file2). I want to add the second column of file2 to as 3rd column of file1. But, the 3rd column values corresponds to the values of the 2nd...
1,338
Posted By gaurab
@vbe and @ctsgnb Thanks a lot. The one I...
@vbe and @ctsgnb
Thanks a lot.

The one I liked the best was,


And even better,

# echo "z"
z
1,913
Posted By gaurab
using shell script: make a shell script...
using shell script:

make a shell script (shell.sh) which takes 1 argument (data filename)

count=0
for i in `cat $1`
do
count=`expr $count + 1`
if [ $count -eq 1 ]
then
top=$i
fi
echo $i...
1,338
Posted By gaurab
Storing values in shell variable
Hi,

I am writing a shell script where,


x=y
y=z


When I want to print z, I can do


$y


How do I use only "x" without any direct reference to "y" to print z?

Thanks,
-G
1,687
Posted By gaurab
GNUPLOT: contour lines
I have a data file with 3 columns.

I want to plot a "map view" plot with column 1 and column 2 as x and y axis respectively.

The third column is 0 or one.

I want a plot that draws a line...
3,378
Posted By gaurab
Using awk If you just want to replace the . in...
Using awk
If you just want to replace the . in the 3rd column

awk '{if($3==".") print $1" "$2" NA";else print}' infile
5,535
Posted By gaurab
I'm staring at one of your frustrations right...
I'm staring at one of your frustrations right now.
http://i.imgur.com/09rFr.png
5,535
Posted By gaurab
Thanks. Yeah, I tried it and it works. "scottn"...
Thanks. Yeah, I tried it and it works. "scottn" posted this command a couple of minutes ago.

-G
5,535
Posted By gaurab
I know this sounds dumb but I don't really know...
I know this sounds dumb but I don't really know (never actually bothered to find out) why people use tcsh. So far I never have had a problem with bash that couldn't be solved with some sort of...
5,535
Posted By gaurab
Cool. I was already happy, but I am happier to...
Cool. I was already happy, but I am happier to have another command in my arsenal.

I mostly work in bash. I can see this command working in both bash abd sh and not in tcsh, but I never use tcsh....
5,535
Posted By gaurab
Wow. That was fast. That's what she said....
Wow. That was fast.
That's what she said. (Sorry, I couldn't help myself) :-D

Thanks a bunch. It does exactly what I want.

-G
Showing results 1 to 25 of 27

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