Sponsored Content
Full Discussion: does head create new file
Top Forums UNIX for Advanced & Expert Users does head create new file Post 302353371 by methyl on Tuesday 15th of September 2009 08:00:32 AM
Old 09-15-2009
This is safer than "head" and "tail" for large numbers of lines:

Code:
sed -n '1,1000 p' abc.txt > acd.txt
sed -n '1001,$ p' abc.txt > bcd.txt

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

head command wont work on MF file

I am trying to do a head on a mainframe file and on doing ti just gives me a blank screen with nothing on it. however, when i do a tail for the same file...i get a few lines on the screen. i know tht mainframe files have all the records on one line...does this have to do something with this.... (10 Replies)
Discussion started by: alfredo123
10 Replies

2. UNIX for Dummies Questions & Answers

how to save to file as head rows_numbers big_file

hi all, Please help me to write. How to create the file by getting numbers of rows from orginal file. I tried the following one, doesn't work. head 50000 file1 >> file1_1 head: cannot open `50000' for reading: No such file or directory Thank you (2 Replies)
Discussion started by: mr_bold
2 Replies

3. Shell Programming and Scripting

printing first n lines in a file without using head

i have to print first n lines of a file. how can i do that without using head command. for some reason i do not want to use Head. is there a way to get that result using awk or sed?. i an using this on korn shell for AIX Thanks.. (7 Replies)
Discussion started by: dareman123
7 Replies

4. Programming

which head file define '_IO_*'

Under Solaris 10,I compile following file, #include <sys/types.h> #include <sys/stat.h> #include <sys/termios.h> #include <sys/ioctl.h> #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <string.h> #include <unistd.h> #include <signal.h> #define _IO_UNBUFFERED __SNBF... (1 Reply)
Discussion started by: konvalo
1 Replies

5. Shell Programming and Scripting

head command with more than one file

Hi, I have the following problem. I have files with one column of data (let's say file1.dat, file2.dat...file6.dat), and I would like to record the first value of the column of each file into another file (let's name it fileall.dat), which would have the the six values, one in each column. I use to... (4 Replies)
Discussion started by: josegr
4 Replies

6. Shell Programming and Scripting

Add one text line in the head of the file

hello, how can I add one text line string at the line number one of a file. thankx, (5 Replies)
Discussion started by: Ahmed waheed
5 Replies

7. Shell Programming and Scripting

Help awking a 'head -1 file.txt' input

Hi there, my ksh script collects a procstack trace for a particular pid and then greps it by a transaction id to find out the pthread ID: ---------- tid# 1876087 (pthread ID: 4466) ---------- So the pthread ID I want is 4466 in this case, and it is assighed to the variable $pthread.... (4 Replies)
Discussion started by: tmf33uk
4 Replies

8. Shell Programming and Scripting

appending the count of line in each file at head of each file

hello everybody, I have some files in directory.each file contain some data. my requirement is add the count of each line of file in head of each file. any advice !!!!!!!! (4 Replies)
Discussion started by: abhigrkist
4 Replies

9. Shell Programming and Scripting

How can i get the head of file while using awk?

Hi All, I'm a newbie here, I'm just wondering how can i get the head of my file while using awk? input data: nik1,nik2,nik3 nik2,nik3,nik4 nik3,nik4,nik5 expected output is: nik1 because it is in the top and it is in the first delimeted. i tried awk -F "," '{print $1}' but i... (2 Replies)
Discussion started by: nikki1200
2 Replies

10. UNIX for Dummies Questions & Answers

Rsync whole folder and head of each file

Hello, I am trying to backup the whole folder which contains years of data and huge size, some files are > 10GB. I want keep the exact organization of the folder, except that for bigger file only part of it (say head -50, or simply only the name of the file) will be kept. Then the structure of the... (2 Replies)
Discussion started by: yifangt
2 Replies
PESCETTI(1)						      General Commands Manual						       PESCETTI(1)

NAME
pescetti -- Pseudo-Duplimate Generator SYNOPSIS
pescetti DESCRIPTION
This manual page documents briefly the pescetti command. OPTIONS
Here are a list of the available options and what they do. You must specify exactly one from --demo, --generate or --load. --help Prints the help text --demo Demonstration mode. Generates one hand with permutations and the tutorial for how to use them. --generate=N Generate N random boards --load=boards.txt Load boards+analysis from boards.txt --load-dds=boards.dds Load boards from boards.dds in dds format --load-analysis=tricks.txt Load analysis from tricks.txt --permutations=permutations.txt Generate the permutations and save them to the given file --curtains=curtains.txt Save curtain cards to file curtains.txt --save=boards.txt Save the boards+analysis to boards.txt --save-dds=boards.dds Save the boards to boards.dds in dds format --save-analysis=tricks.txt Save the analysis to tricks.txt --format=html|txt|pdf Set the output mode to the given format --title=title Set the title for the output --output=hands.txt Print the hands to hands.txt, rather than to standard output --stats Generate statistics about the set of boards; included in the hands output --analyze Run the dds analyzer on the boards and print the resulting numberof tricks (warning SLOW) --criteria= A list of criteria to apply to each generated hand to generate specific hand types. The list should be space separated and each item may be suffixed with a colon and a (fractional) probability value which can be used to weight the criteria. E.g. --criteria="weaknt:0.8 strongnt:0.5" Valid criteria are: unbalanced weaknt strongnt twont strongtwo weaktwo three twoclubs 4441 singlesuit twosuits partscore game slam game-invite slam-invite jumpshift jumpfit splinter bacon weird --probability=factor Generate hands matching the criteria with only the given probability. Factor is in the range 0 to 1. On each attempt to generate a board it is rejected if it doesn't match the criteria with the given probability. A factor of about 0.8 gives roughly half matching boards AUTHOR
This manual page was written by Matthew Johnson <debian@matthew.ath.cx>. Permission is granted to copy, distribute and/or modify this docu- ment under the terms of the GNU General Public License, Version 2 as published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. PESCETTI(1)
All times are GMT -4. The time now is 01:55 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy