Search Results

Search: Posts Made By: kellywilliams
28,586
Posted By chapeupreto
Hi there. Maybe you should use sed. Try doing...
Hi there.
Maybe you should use sed.
Try doing something like:

sed -i.bkp 's/^/filenameU/' your_input_file.txt

Is your columns delimited by tab or spaces?
In case of tabs, and, if you're...
28,586
Posted By itkamaraj
Try with some two files, and check the output and...
Try with some two files, and check the output and then apply it for all the files.


for i in *; do nawk '{print FILENAME"\t"$0}' $i > $i.bk; mv $i.k $i; done
3,318
Posted By durden_tyler
Ok, I think ahamed's observation is true. The...
Ok, I think ahamed's observation is true. The files are not true ASCII text files.

So I downloaded both files in my Windows machine and used Cygwin Bash to prod around. Here's what I see:


$...
3,318
Posted By durden_tyler
You may want to clean up the files you posted and...
You may want to clean up the files you posted and then try the scripts on them.

I do hope you have Perl in your RedHat Linux box.
If not, then the following suggestion won't work.
Otherwise, do...
3,318
Posted By durden_tyler
Not sure what that "invalid option" error is....
Not sure what that "invalid option" error is. What's your Unix/Linux system and version of awk? In short, what's the output of the following commands?


uname -a
uname --all
awk
awk --version...
3,318
Posted By Chubler_XL
You will need to convert to txt or csv first as...
You will need to convert to txt or csv first as awk/grep require text files not binary.

Try this:

echo Please input gene name you wish to look for
read GeneName
for file in *.txt
do
...
3,318
Posted By mayursingru
Hi Kelly, Missed one detail use following...
Hi Kelly,
Missed one detail use following line for grep
grep -H $Genename file1.txt > somefile.txt


Regards,
Mayur
2,708
Posted By rdcwayx
awk '{$1="chr" $1 FS $2-1}1' infile
awk '{$1="chr" $1 FS $2-1}1' infile
2,708
Posted By Chubler_XL
awk '{$1="chr"$1; $2=($2-1)FS$2; print}'...
awk '{$1="chr"$1; $2=($2-1)FS$2; print}' infile
2,708
Posted By aix-guy
Add col and letters
cat $1 |awk '{
c1="chr" $1
c2=$2-1
c3=$2
cut_lng=(length($1 $2)+3)
ln_l=length($0)
c4=(substr($0,cut_lng,ln_l-cut_lng))
printf("%s %s %s %s\n",c1,c2,c3,c4)
}'
...
Showing results 1 to 10 of 10

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