Sponsored Content
Top Forums Shell Programming and Scripting Shell scripting : pls help me Post 302460825 by hravisankar on Wednesday 6th of October 2010 03:03:32 PM
Old 10-06-2010
Network Shell scripting : pls help me

I have an input file in this format (shown below). I have to select the lines which doesnt followed by 'miR-" and to save such lines into an output file. For easy identification they are shown here in blue color. They have to be selected. Pls. help me to write a shell script to select those lines which doesnt followed by miR- and have to write them in a file.
KINDLY DO THE HELP

>sample1:1:1:1056:8164#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1057:7503#0 0 0
>sample1:1:1:1057:18666#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1057:1725#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1057:12664#0 0 0
>sample1:1:1:1057:18537#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1058:8130#0 1 1
miR-2396;Chr26:42482649-42482717 -1 2
>sample1:1:1:1058:19619#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1059:6357#0 0 0
>sample1:1:1:1059:10418#0 0 0

>sample1:1:1:1059:12084#0 1 1
miR-16-1;Chr12:19596200-19596290 -52 2
>sample1:1:1:1060:13498#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1060:11510#0 0 0
>sample1:1:1:1060:2691#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1060:5177#0 0 0
>sample1:1:1:1060:13599#0 1 1
miR-16-1;Chr12:19596200-19596290 -52 2
>sample1:1:1:1060:12022#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1061:8105#0 0 0
>sample1:1:1:1062:4635#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1062:2052#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1062:17129#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1063:6105#0 0 0
>sample1:1:1:1064:11266#0 0 0

>sample1:1:1:1065:5224#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1065:14605#0 1 1
miR-152;Chr19:39081165-39081250 +53 2
>sample1:1:1:1066:5654#0 0 0
>sample1:1:1:1066:10310#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1067:3521#0 1 1
miR-184;Chr21:25913771-25913853 +52 2
>sample1:1:1:1067:1055#0 1 1
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

scripting guru's pls help me with scripting on AIX

can someone pls help me with the script for a files coming from one system to a particular directory and i want to write a script to move those files to another directory on different system by renaming the files... pls someone help me on this... thanking in anticipation.... (1 Reply)
Discussion started by: thatiprashant
1 Replies

2. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

3. Shell Programming and Scripting

HELP me PLS... Simple Scripting!

this is my script.... SQL> select * from dba_profiles 2 where resource_name in ('FAILED_LOGIN_ATTEMPTS','PASSWORD_LOCK_TIME') 3 order by profile; and this is the output... PROFILE RESOURCE_NAME RESOURCE... (2 Replies)
Discussion started by: liezer
2 Replies

4. Shell Programming and Scripting

HELP PLS!! Shell Scripting!!

Dear All, forgive me as i am a complete beginner in shell scripting in UNIX. I have a file with data similair to the following 8 McDonalds Sandwich 1.99 9 Mcdonalds Fries 1.20 13 McDonalds Milkshake 1.20 7 ... (9 Replies)
Discussion started by: Mary_xxx
9 Replies

5. Shell Programming and Scripting

hi..all..pls...help..!!..profile scripting..

hi.. I want to customize a user in unix which could have only ftp access and NO TELNET ACCESS! ..... As being a newbie to unix to my understanding the user .profile has to be edited but if someone can explain how to edit it so that i can block telnet access for that user.....Is /etc/profile has... (5 Replies)
Discussion started by: rookie250
5 Replies

6. UNIX for Advanced & Expert Users

pls help me in scripting

i want to write a script that if the time is 8 then it give a message that the time is 8 and if it is 9-10 then it gives a message that time to go to office like that. can any one help me? (3 Replies)
Discussion started by: lakshmananindia
3 Replies

7. Shell Programming and Scripting

shell script, pls help

# for i in `cat oo`;do ls -ld $i;done ls: /var/tmp/i: No such file or directory ls: i: No such file or directory ls: /var/tmp/ii: No such file or directory ls: i: No such file or directory ls: /var/tmp/iii: No such file or directory ls: i: No such file or directory ls: /var/tmp/iiii: No such... (2 Replies)
Discussion started by: cpttak
2 Replies

8. Shell Programming and Scripting

scripting/awk help : awk sum output is not comming in regular format. Pls advise.

Hi Experts, I am adding a column of numbers with awk , however not getting correct output: # awk '{sum+=$1} END {print sum}' datafile 2.15291e+06 How can I getthe output like : 2152910 Thank you.. # awk '{sum+=$1} END {print sum}' datafile 2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies

9. Shell Programming and Scripting

Shell program help pls

first queestion if what does "-s" mean? second seqx -n 10000000 -c 10 < $seqfile >$temp seqx? -n? -c? what do these mean? third if && ! cmp -s $missing $temp explain these codes ty (2 Replies)
Discussion started by: imtheone
2 Replies

10. Shell Programming and Scripting

Need help with first shell script pls.

Hi, I'm trying to extract information from one file to update another one and am a bit stuck. the first file is made up of tags e.g. <item>a@b.com</item> jksdhfjkdsh sldkjfds l klsjdf <item> c@d.com </item> what i'd like to do is extract the email addresses between these tags,... (6 Replies)
Discussion started by: newb1000
6 Replies
DDB(8)							    BSD System Manager's Manual 						    DDB(8)

NAME
ddb -- configure DDB kernel debugger properties SYNOPSIS
ddb capture [-M -core] [-N -system] print ddb capture [-M -core] [-N -system] status ddb script scriptname ddb script scriptname=script ddb scripts ddb unscript scriptname ddb pathname DESCRIPTION
The ddb utility configures certain aspects of the ddb(4) kernel debugger from user space that are not configured at compile-time or easily via sysctl(8) MIB entries. To ease configuration, commands can be put in a file which is processed using ddb as shown in the last synopsis line. An absolute pathname must be used. The file will be read line by line and applied as arguments to the ddb utility. Whitespace at the beginning of lines will be ignored as will lines where the first non-whitespace character is '#'. OUTPUT CAPTURE
The ddb utility can be used to extract the contents of the ddb(4) output capture buffer of the current live kernel, or from the crash dump of a kernel on disk. The following debugger commands are available from the command line: capture [-M core] [-N system] print Print the current contents of the ddb(4) output capture buffer. capture [-M core] [-N system] status Print the current status of the ddb(4) output capture buffer. SCRIPTING
The ddb utility can be used to configure aspects of ddb(4) scripting from user space; scripting support is described in more detail in ddb(4). Each of the debugger commands is available from the command line: script scriptname Print the script named scriptname. script scriptname=script Define a script named scriptname. As many scripts contain characters interpreted in special ways by the shell, it is advisable to enclose script in quotes. scripts List currently defined scripts. unscript scriptname Delete the script named scriptname. EXIT STATUS
The ddb utility exits 0 on success, and >0 if an error occurs. EXAMPLES
The following example defines a script that will execute when the kernel debugger is entered as a result of a break signal: ddb script kdb.enter.break="show pcpu; bt" The following example will delete the script: ddb unscript kdb.enter.break For further examples, see the ddb(4) and textdump(4) manual pages. SEE ALSO
ddb(4), textdump(4), sysctl(8) HISTORY
The ddb utility first appeared in FreeBSD 7.1. AUTHORS
Robert N M Watson BUGS
Ideally, ddb would not exist, as all pertinent aspects of ddb(4) could be configured directly via sysctl(8). BSD
December 24, 2008 BSD
All times are GMT -4. The time now is 09:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy