Sponsored Content
Top Forums Shell Programming and Scripting Moving or copying first rows and last rows into another file Post 302841017 by kylle345 on Tuesday 6th of August 2013 11:05:46 PM
Old 08-07-2013
Moving or copying first rows and last rows into another file

Hi I would like to move the first 1000 rows of my file into an output file and then move the last 1000 rows into another output file.

Any help would be great

Thanks
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Converting rows into multiple-rows

Hi every one; I have a file with 22 rows and 13 columns which includes floating numbers. I want to parse the file so that every five columns in the row would be a new record (row). For example, the first line in the old file should be converted into three lines with first two lines contain 5... (6 Replies)
Discussion started by: PHL
6 Replies

2. Shell Programming and Scripting

Deleting specific rows in large files having rows greater than 100000

Hi Guys, I need help in modifying a large text file containing more than 1-2 lakh rows of data using unix commands. I am quite new to the unix language the text file contains data in a pipe delimited format sdfsdfs sdfsdfsd START_ROW sdfsd|sdfsdfsd|sdfsdfasdf|sdfsadf|sdfasdf... (9 Replies)
Discussion started by: manish2009
9 Replies

3. Shell Programming and Scripting

delete rows in a file based on the rows of another file

I need to delete rows based on the number of lines in a different file, I have a piece of code with me working but when I merge with my C application, it doesnt work. sed '1,'\"`wc -l < /tmp/fileyyyy`\"'d' /tmp/fileA > /tmp/filexxxx Can anyone give me an alternate solution for the above (2 Replies)
Discussion started by: Muthuraj K
2 Replies

4. Shell Programming and Scripting

Remove 1st two rows and last 2 rows

Hi All, I need to remove 1st 2 line from head and last 2 line from last. I thought it would be possible by using the Head and tail command. But after i am using it is not possible by it. Example:Input file 1 2 3 4 5 Example: Output file 3 But my head and tail command are not... (12 Replies)
Discussion started by: kam786sim
12 Replies

5. Shell Programming and Scripting

Split single rows to multiple rows ..

Hi pls help me out to short out this problem rm PAB113_011.out rm: PAB113_011.out: override protection 644 (yes/no)? n If i give y it remove the file. But i added the rm command as a part of ksh file and i tried to remove the file. Its not removing and the the file prompting as... (7 Replies)
Discussion started by: sri_aue
7 Replies

6. UNIX for Dummies Questions & Answers

moving columns to alternating rows

Hello, I have a space delimited file like this: AAA BBB CCC DDD EEE FFF GGG HHH III And I would like to change it to the following (including the plus signs): AAA BBB + CCC DDD EEE + FFF GGG HHH (2 Replies)
Discussion started by: blakers
2 Replies

7. Shell Programming and Scripting

Copying down first row in to all the below blank rows in a .csv file

Hi All, I have many of files(.csv) of the format given below. Date,Name,Location 04/02/2012,A,India ,B,China ,C,USA Like this I have 1000's of rows and many columns in all my files. I need a shell script to copy down the Date(in this example column1) to the next 2 rows below(in the... (8 Replies)
Discussion started by: ks_reddy
8 Replies

8. UNIX for Dummies Questions & Answers

merging rows into new file based on rows and first column

I have 2 files, file01= 7 columns, row unknown (but few) file02= 7 columns, row unknown (but many) now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there e.g. file 01 James|0|50|25|10|50|30... (1 Reply)
Discussion started by: A-V
1 Replies

9. Shell Programming and Scripting

Merging rows using two common rows.

Hi.. My requirement is simple but unable to get that.. File 1 : 3 415 A G 4 421 G . 39 421 G A 2 421 G A,C 41 427 A . 4 427 A C 42 436 G . 3 436 G C 43 445 C . 2 445 C T 41 447 A . Output (4 Replies)
Discussion started by: empyrean
4 Replies

10. UNIX for Beginners Questions & Answers

Reading and copying a selected rows

Dear All, I have a data file input.res like below. (Only six column shown here for example.) Sequence of first column starting from 1 to 148. Input file 1 Q0 9_August_2014_Entertainment2 0 20.14967806339729 BM25b1.0 1 Q0 13_October_2012_Page323 1 20.134224346765738 BM25b1.0 1 Q0... (2 Replies)
Discussion started by: imranrasheedamu
2 Replies
XVIER(6)							   Games Manual 							  XVIER(6)

NAME
xvier - a X11 board game. SYNOPSIS
xvier [ -display displayname ] [ -geometry geometry ] [ -fn fontpattern ] [ -iconic ] [ -rows rows ] [ -columns columns ] [ -prog program- path ] [ -level levelnumber ] DESCRIPTION
Xvier is a board game where you and the computer alternately throw stones into free columns. The stones pile up in the columns, and the goal is to get four stones in a row, in a column or diagonally. You can choose various board sizes and levels of difficulty. During the game you click with the mouse onto the column where you want to put your stone. Another possibility is a lower case letter in the range 'a' to 'm' (maximally) where 'a' is the left column. If you want to change the level of difficulty, you must use the keyboard. Simply type the number of the desired level. These levels correspond to the search depth of the game program. The meaning of the command line options and buttons is given below. While the game program computes a move, everything besides Change and Quit is blocked. OPTIONS
-display displayname The X11 screen you want to use. -geometry geometry The desired geometry of the game window. -fn fontpattern A pattern describing the fonts which are used for the buttons and messages. Xvier chooses the biggest font that fits into the win- dow. Therefore the pattern should describe different sizes of one font. The default is *-Helvetica-Medium-R-Normal-*. -iconic Start in iconic state. -rows rows The number of rows of the board. The possible range is 4 to 13. The default is 6. -columns columns The number of columns of the board. The possible range is 4 to 13. The default is 7. -prog programpath The path of the game program. -level levelnumber The level of difficulty to start with. The possible range is 0 to 9. The default is 0. BUTTONS
The keyboard equivalents of the buttons are given in brackets. Quit ['q' or 'Q'] Finish the game. New ['n' or 'N'] Start a new game. Undo ['u' or 'U'] Undo one move. Start ['s' or 'S'] Let the computer begin with the first move. The board must be empty. Change ['C'] Exchange the colours of your and the computer's stones. AUTHOR
Norbert Jung jung@dia.informatik.uni-stuttgart.de 21 April 1992 XVIER(6)
All times are GMT -4. The time now is 07:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy