10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Dear All,
assume i have a file with content:
<Start>6000</Start>
<Stop>7599</Stop>
the output is:
6000
7000
7100
7200
7300
7400
7599
how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix.
Thanks
Jimmy (3 Replies)
Discussion started by: jimmy_y
3 Replies
2. Shell Programming and Scripting
Hello everyone,
I want to remove only prefix ME_ from all the values that are present in the FILEA. Below code I'm using for this.
sed 's/ME\_//g' FILEA > FILEB
Using the above code, all ME_ values are getting removed from the file. But the problem here is I want to remove only Prefix ME_... (4 Replies)
Discussion started by: ed_9
4 Replies
3. Shell Programming and Scripting
Possible filenames:
CDD_Whatever.txt
DDD_Whatever.txt
If the file prefix = CDD, I'd like to prefix every person ID (second column in my examples below) on the file with "c-"
If the file prefix = DDD, I'd like to prefix ever person ID with "d-"
Input:
Desired Output:
Any help... (2 Replies)
Discussion started by: lrluis
2 Replies
4. Shell Programming and Scripting
File 1
aaa
ccc
fff
File 2
aaa
bbb
ddd
File 3
aaa
bbb
eee
File 4 (4 Replies)
Discussion started by: Misa-Misa
4 Replies
5. Shell Programming and Scripting
Hi, I'm new about shell scripting, and I need to do something like
abcd **1234** efgh
by
abcd '''1234''' efgh
I know that command sed helps about change one string by another, but I dont know how to keep whatever is inside **_** and replace * with '.
Thanks! (5 Replies)
Discussion started by: selvaya
5 Replies
6. Programming
Hi Guys,
I wonder how can I determine when a given number is a multiple of another one in java. Let's say if I have 27 how can I determine whether is multiple of 5 using java programming. Thanks. (1 Reply)
Discussion started by: arizah
1 Replies
7. Shell Programming and Scripting
I have a variable embedded in a long string called "commands" coming in on a query_string. I need to copy the string to a file with the variable $loop1 converted before it writes. Right now, it writes the varible itself instead of what it should be.
QUERY_STRING... (2 Replies)
Discussion started by: numele
2 Replies
8. UNIX for Dummies Questions & Answers
I have a file:
chromosome1:436728
chromosome2:32892
.....
chromosome22:23781
I just want to get the number, not the prefix "chromosomeX", so I want to remove all the prefix ahead of the numbers. How can I do that?? Thanks!!! (PS: give me some very simple command so that I can understand... (4 Replies)
Discussion started by: kaixinsjtu
4 Replies
9. Shell Programming and Scripting
Hi all,
I have a requirement where in i have to create a temporary file by prefixing a string of special characters to each row of a input file.
the input file is '|' delimited.
here is the content of input file
aaa|1234|axad|123
bbb|qwqw|qw|1334
the output should be
... (5 Replies)
Discussion started by: nvuradi
5 Replies
10. Shell Programming and Scripting
Hi folks,
I have the following parameter setting:
export ADMIN_HOST_NAME=http://hostname.com
I want to define a new parameter,ADMIN_HOST_NAME_NEW,which based on $ADMIN_HOST_NAME but I need to remove the prefix "http://".
The requested result for $ADMIN_HOST_NAME_NEW is hostname.com
How... (2 Replies)
Discussion started by: nir_s
2 Replies