10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
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)
Discussion started by: echo manolis
7 Replies
2. Shell Programming and Scripting
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)
Discussion started by: kenshinhimura
5 Replies
3. Shell Programming and Scripting
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)
Discussion started by: sea
9 Replies
4. UNIX for Dummies Questions & Answers
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)
Discussion started by: newbie2010
2 Replies
5. Shell Programming and Scripting
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)
Discussion started by: olifu02
7 Replies
6. Shell Programming and Scripting
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)
Discussion started by: LMHmedchem
14 Replies
7. Shell Programming and Scripting
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)
Discussion started by: genehunter
6 Replies
8. UNIX for Dummies Questions & Answers
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)
Discussion started by: intraining11
1 Replies
9. Shell Programming and Scripting
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)
Discussion started by: nortypig
10 Replies
10. UNIX for Dummies Questions & Answers
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)
Discussion started by: sleepster
2 Replies