I have a file such as this:
I want to sort it, I use this command:
but I get this output, how can I fix this?
10 comes after 1 which is not correct, I want the chrz to be the last.
How do I check if a variable consisted of letters, numbers or both letters and numbers?
For example, I have a variable $X and I want to print "1" if it contains only letters, "2" if it contains only numbers and "3" if it contains both (2 Replies)
it must be late because I'm sure this is an easy task with grep sed or awk
string would be anything mixing numbers letters and ) ( =
output I need is just the numbers... but I just can't seem to get it to work.
Any tips would be great :) (10 Replies)
Hello all I am a unix newbie....
I have a sun netra t1 and it is freaking out
I am connected to it through a console port, and it is just spitting out a ton on numbers and letters like below its just keeps going and going.
I have tried rebooting it and I cannot get it back to any kind of a... (1 Reply)
Assoc.txt
CHR SNP BP A1 TEST NMISS OR STAT P
1 rs2980319 766985 A ADD 4154 1.024 0.1623 0.8711
1 rs2980319 766985 A AGECAT 4154 1.371 6.806 1.003e-11
1 ... (6 Replies)
If I have a set of strings,
C21
F231
H42
1C10
1F113
and I want to isolate the ints following the char, what would the sed string be to find numbers after letters?
If I do,
*, I will get numbers after letters, but I am looking to do something like,
sed 's/*/\t*/g'
this will give me... (14 Replies)
Hi,
I columns with both number and letters however i need the number 4 trimmed off the lines that have 3 numbers in them so it just because the 2 preceding numbers only
For example
V25QG2-K18QG-V25CG2
L26HG-L17HA-L26CG
I434QD1-L19HB2-I434CD1
I434QD1-A31QB-I434CD1 ... (7 Replies)
I have a file with hundreds of lines in it. I wanted to extract anything that matches the following:
KR followed by 4 digits:
example KR1201
cat list | sed "s///g"
Is the closest I've come, and obviously it is not what I want. This would remove all of the items that I want and leave me... (2 Replies)
Heyas
Just a little fun script (code block) i'd like to share for fun.
#/bin/bash
# roman.sh
#
# Function
#
num2roman() { # NUM
# Returns NUM in roman letters
#
input=$1 # input num
output="" # Clear output string
len=${#input} # Initial length to count down
... (9 Replies)
Hi Guys,
is there any way to sort a files from excel in shell?
$cat file1
asa003 hekk
asa341 no more
asa012 try a d g
asa001 a
asa111 this is just a sample for long string
Desire output:
asa001 a
asa003 hekk
asa012 try a d g
asa111 this is just a sample for long string
asa341... (5 Replies)
Hi!
I found and then adapt the code for my pipeline...
awk -F"," -vOFS="," '{printf "%0.2f %0.f\n",$2,$4}' xxx > yyy
I add -F"," -vOFS="," (for input and output as csv file) and I change the columns and the number of decimal...
It works but I have also some problems... here my columns
... (7 Replies)