Sponsored Content
Top Forums Shell Programming and Scripting Move a line to top of the file Post 302864319 by disedorgue on Wednesday 16th of October 2013 09:48:45 AM
Old 10-16-2013
Hi,
Another sed solution (also work with regular expression):
Code:
 sed -n '1,/Output view:/{/Output view:/{G;s/\n//p;b;};H;b};p' file

Regards.
 

10 More Discussions You Might Find Interesting

1. Programming

how to move file pointer to a particular line in c

Hello experts, I ve a text file I want to go to particular line . what is the best way to do this in c ? I am tried as follows fseek ( fh, pos, SEEK_SET); but this functions moves the file pointer according to a number of bytes. Unfortunately I don't know the exact byte... (7 Replies)
Discussion started by: user_prady
7 Replies

2. Shell Programming and Scripting

how to move the line after a certain pattern in the file

Hi, I have a file called /bb/bin/rstrt. I need to move the line/entry "ccpm_load_shared_memory" after the entry "initcorp". The problem is that there are several entries for "initcorp" in this file and I need the entry to be moved only after the first instance of "initcorp" Is there a way... (5 Replies)
Discussion started by: aoussenko
5 Replies

3. Shell Programming and Scripting

find top 100 files and move them

i have some 1000 files in my dir and i want to find top 100 files and move them to some other location: below the 2 commands i used, but it is not working ls -ltr | grep ^- | head -100 | xargs mv destination - _________>not working ls -ltr | grep ^- | head -100 | xargs mv {}... (3 Replies)
Discussion started by: ali560045
3 Replies

4. AIX

want to remove some line from top of file.

Hi All, I have AIX 5.3 server. I have one big file. in that i want to remove 5000 line from top. is there any command for this? Thanks, Vishal (6 Replies)
Discussion started by: vishalpatel03
6 Replies

5. Shell Programming and Scripting

best way to insert a line at the top of a file?

say I want to insert "this is a test" as the first line into file A, besides echo "this is a test" > /tmp/tmpfile cat /tmp/tmpfile fileA >> /tmp/result, is there any simple way I can do it? thanks (7 Replies)
Discussion started by: fedora
7 Replies

6. Shell Programming and Scripting

Move a line to end of file

Can somebody help me with a script .... Read a file /etc/inittab find the string starting with rcml and move it entirely towards the end of file. rcml:2:once:/usr/sni/aix52/rc.ml > /dev/console 2>&1 I basically want to change the startup sequence. (2 Replies)
Discussion started by: imanuk2007
2 Replies

7. Shell Programming and Scripting

append a line into a file in the top

hi, My code is #!/bin/sh echo "\n\nPlease enter the month of the year(YYYYMM) : \c" read date_rep INPUT_L9_FILE=L9_Recharge_Description_EOM_$date_rep.csv #This part is used to summarise Grand_Total, Balance_Total of file L9_Recharge_Description_EOM_${1}.csv. awk -F"," '{if(NR!=1)... (5 Replies)
Discussion started by: madfox
5 Replies

8. Shell Programming and Scripting

Use sed to move last line to top

I have parsed a curl download with sed commands. I would also like to move the last line in the output file to the top. Can I use sed for this? (3 Replies)
Discussion started by: jostber
3 Replies

9. UNIX for Dummies Questions & Answers

add a new line on top of a file

infile a b c A E F 1 2 3 outfile new line a b c A E F 1 2 3 I tried: sed '1i\ new line' infile > outfilecat outfile new linea b c A E F 1 2 3 I don't want the new line be added to the existing first line. Thanks Joseph (7 Replies)
Discussion started by: jdhahbi
7 Replies

10. Shell Programming and Scripting

Move a text to next line in a file

Hi , I need your help for the below issue. I have a file which has data as below An error came (/u01/app/12.csv) pkg1.func1: detail s 1111-->pkg1.func1: detail s 2222--> Now pkg1.func1: .... --> can come multiple times in the second line. I need to arrange the data in the below... (9 Replies)
Discussion started by: bhaski2012
9 Replies
MAQVIEW(1)						       Bioinformatics Tools							MAQVIEW(1)

NAME
Maqview - Maq alignment indexer and viewer SYNOPSIS
maqindex -i|-v|-b [-c in.cns] in.map [chr[:start[-end]] [...]] maqview [-c in.cns] in.map DESCRIPTION
Maqview is a set of programs that achieves fast random access to the alignment file generated by `maq map', and displays the alignment with a nice GUI (Graphical User Interface). It is highly efficient in speed, memory and disk usage. Maqview is based on OpenGL and is known to work on both Mac OS X and Linux. Porting to Windows is in principle easy. maqindex maqindex -i|-v|-b [-c in.cns] in.map [chr[:start[-end]] [...]] -i Index the alignment file -v Print the alignment in the specified region in the `maq mapview' format -b Dump the alignment in the specified region in the binary .map format -c FILE Index the Maq consensus file for viewing in maqview at the same time Program maqindex indexes a maq alignment file in.map or quickly retrieves all the reads in one or multiple regions. One of -i, -v and -b must be used. For -v or -b, at least one region like `chrX', `chrX:1000' or `chrX:1,000-2,000' must be specified. Multiple regions are allowed. maqview maqview [-c in.cns] in.map -c FILE The Maq consensus file Program maqview displays the read alignment in a graphical window. When in.cns is specified, the top sequence is the reference, followed by the Maq consensus sequence; otherwise, the majority-rule consensus will be calculated. Maqview has two views: sequence view and box view. In the sequence view, read sequences will be printed on the screen. Darker bases indicate lower base qualities and red ones show the differences in comparison to the reference if in.cns is speficied or to the majority- rule consensus if not. In the box view, different types of nucleotides are represented as colour boxes with green for A, cyan for C, orange for G, red for T and dark gray for N. The saturation of colours indicates the base qualities and the thickness lines of reads shows the mapping qualities of read alignments. Zooming in/out is supported only in the box view. In both views, the status bar at the bottom of the window will show some information about the key touches, and read names and base qualities pointed by the mouse. Navigating the alignment is accomplished by vaious key bindings. o Key bindings: ? Display help <Esc> Exit <F1> Sequence view <F2> Box view p Switch to the previous reference sequence n Switch to the next reference sequence r Refresh <digits> <Enter> Move to the position pointed by <digits> h / <Left> Move left by one base l / <Right> Move right by one base k / <Up> Move up by one line j / <Down> Move down by one line > Move to the next read < Move to the previous read g / <Home> Move to the begining of the current reference G / <End> Move to the end of the current reference u / <PageUp> Move left by one page <Space>/<PageDn> Move right by one page <Shift> <Arrow> Move by 100 bases <Ctrl> <Arrow> Move by 1000 bases <Ctrl> + Add a new view <Ctrl> - Remove the current view <Enter> Toggle on/off right auto-scrolling ^b Toggle on/off left auto-scrolling + Zoom in - Zoom out 0 Zoom to the default scale q Toggle show/hide mapping qualities e Toggle display SE/PE mapping qualities o Open a new alignment file o Enter an integer and then press <Enter> to jump to the required position. o Enter an integer and then press a key other than <Enter> to speed up scrolling by the specified factor. o Left click and drag the yellow cross in the square to move along the sequence. Right click the reference to highlight a column. LICENSE
GNU General Public License (GPL) AVAILABILITY
<http://maq.sourceforge.net> AUTHORS
Jue Ruan <ruanjue@genomics.org.cn> for writing and maintaining the whole software. Heng Li <lh3@sanger.ac.uk> for testing the program and drafting the documentations. Mengyao Zhao <zhaomengyao@gmail.com> for designing the color schemes. maqview-0.2.4 2008-02-27 MAQVIEW(1)
All times are GMT -4. The time now is 11:37 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy