10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I have something like below
LDC100/rel/prod/libinactrl.a
LAA2000/rel/prod/libinactrl.a
I want to remove till first forward slash that is outputshould be as below
rel/prod/libinactrl.a
rel/prod/libinactrl.a
How can I do that ??? (8 Replies)
Discussion started by: anand.shah
8 Replies
2. UNIX for Dummies Questions & Answers
Hello all. I am a beginner UNIX user who is using UNIX to work on a bioinformatics project for my university.
I have a bit of a complicated issue in trying to use sed (or awk) to "find and replace" bases (letters) in a genetics data spreadsheet (converted to a text file, can be either... (3 Replies)
Discussion started by: Mince
3 Replies
3. Shell Programming and Scripting
Hi ,
How can i get count of replacements done by sed in a file.
I know grep -c is a method.
But say if sed had made 10 replacement in a file, can i get number 10 some how? (8 Replies)
Discussion started by: abhitanshu
8 Replies
4. UNIX for Dummies Questions & Answers
I have a text file where I want to use sed to do multiple replacements all at once (i.e. with a single command) . I want to convert all AA's to 0, all AG's to 1 and all GG's to 2. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
5. Shell Programming and Scripting
Hi all,
I need to run a number of scripts which have a certain phrase on them so I have identified these by;
grep -l 100 *script | sort -u
Normally I could just run something along the lines of;
for i in `grep -l 100 *script | sort -u`; do ./${i}; done
However before I run each of... (0 Replies)
Discussion started by: JayC89
0 Replies
6. Shell Programming and Scripting
Hi,
I've a txt file which contains the following kind of listed data
18971 ./aosrp18.r
15340 ./aosrp12.r
22996 ./aosrp08.r
17125 ./aosrp06.r
I'm trying to get rid of the ./ in the file and have tried the following with sed but I'm not getting the correct result... I'm not sure what way... (7 Replies)
Discussion started by: Jazmania
7 Replies
7. Shell Programming and Scripting
Hi everyone, this is my first post.
Some time ago I did a script to convert .csv files to oracle inserts. Now I need to add something and I can't make it work. This is the code:
#!/bin/bash
#Rev. 2
paso_uno()
{
local tmp=`mktemp temp.uno`
cat $1 > $2
cat $2 > $tmp
mv $tmp $2
}... (7 Replies)
Discussion started by: Tr0cken
7 Replies
8. UNIX for Dummies Questions & Answers
I need a sed line that will take STDM111 and change it to STDM161
the STDM will always be constant but the 3 numbers after will be random, I just need it to always replace the middle number with 6 regardless of what the numbers are. (8 Replies)
Discussion started by: glev2005
8 Replies
9. Shell Programming and Scripting
Hi,
I got a Textfile contains hundreds of lines like this:
3 02 8293820 0 22 22
All I need is this:
293820 0 22 22
So i decided to delete until the first '8' comes up. But how I can realize that? (9 Replies)
Discussion started by: mcW
9 Replies
10. Shell Programming and Scripting
Hi,
For the following complex code ,
<!-- ... (2 Replies)
Discussion started by: fed.linuxgossip
2 Replies