Sponsored Content
Full Discussion: Cut text file in place
Top Forums Shell Programming and Scripting Cut text file in place Post 302833291 by rdrtx1 on Tuesday 16th of July 2013 06:34:17 PM
Old 07-16-2013
for GNU sed, try:
Code:
sed -i -e '1,137097!d' infile

This User Gave Thanks to rdrtx1 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to cut a text file at a certain spot?

Say I do a date command and get the time from 15 minutes ago. I have a text file with the date printed out every minute or so and I want to cut the file at the date stamp given to me by the 15 minute ago time stamp. Is there an easy way to do this? Example: date +%M gives me 56 I... (2 Replies)
Discussion started by: LordJezo
2 Replies

2. Shell Programming and Scripting

Perl - Enter text in a file in a place.

Hi, I have a simple question: I need to enter some text in a text file at a certain place via perl. I would first need to find that specific text in the file and then I would like to insert a line after that particular line. Say I have this text file: I am a great Perl Programmer I... (1 Reply)
Discussion started by: som.nitk
1 Replies

3. Shell Programming and Scripting

Cut big text file into 2

I have a big text file. I want to cut it into 2 pieces at known point or I know the pattern of the contents from where it can separate the files. Is there any quick command/solution? (4 Replies)
Discussion started by: sandy221
4 Replies

4. UNIX for Dummies Questions & Answers

Cut text from a file

How can I cut the text of definite length say from line no. 20 to 1000? It is trivial ques, but I am very new to Unix. Thanks :) (3 Replies)
Discussion started by: JackR
3 Replies

5. Shell Programming and Scripting

How to get awk to edit in place and join all lines in text file

Hi, I lack the utter fundamentals on how to craft an awk script. I have hundreds of text files that were mangled by .doc format so all the lines are broken up so I need to join all of the lines of text into a single line. Normally I use vim command "ggVGJ" to join all lines but with so many... (3 Replies)
Discussion started by: n00ti
3 Replies

6. Shell Programming and Scripting

Inserting text into a file but searching for the place to put it!

Hi I would love a bit of help with a problem im having with a script. I need to insert a line of text which is saved in a variable called $fwInsert into a file whos name is saved in a variable called $server but it needs to be in a certain order. The file is a forward file for a network and... (12 Replies)
Discussion started by: KatieV
12 Replies

7. Shell Programming and Scripting

Cut text from a file and remove

Hello Friends, I am stuck with the below problem.Any help will be appreciated. I have a file which has say 100 lines. On the second last line I have a line from which i want to remove certain characters.. e.g CAST(CAST( A as varchar(50)) || ',' || CAST(CAST( B as varchar(50)) || ',' ||... (8 Replies)
Discussion started by: vital_parsley
8 Replies

8. UNIX for Advanced & Expert Users

Place the results of a CUT command into a variable

I am being passed a file in UNIX, ie: variable.txt I need to extract the first part of the file content, up to the period, content ie: common_dir.second_output cut -d'.' -f1 /content/stores/variable.txt I then need to utilize the results to create a variable ($1), and test on that... (4 Replies)
Discussion started by: talonbow
4 Replies

9. Shell Programming and Scripting

awk to place specific contents filename within text file

I am trying to use awk to place the contens of a filename in $1 and $2 followed by the data in the text file. Basically, put the filename within the text file. There are over 1000 files in the directory and as of now each file is saved with a unique name but it is not within the file. Thank you... (10 Replies)
Discussion started by: cmccabe
10 Replies

10. Shell Programming and Scripting

Modifying text file records, find data in one place in the record and print it elsewhere

Hello, I have some text data that is in the form of multi-line records. Each record ends with the string $$$$ and the next record starts on the next line. RDKit 2D 15 14 0 0 0 0 0 0 0 0999 V2000 5.4596 2.1267 0.0000 C 0 0 0 0 0 0 0 0 0 0 0 ... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
WALL(1) 							   User Commands							   WALL(1)

NAME
wall -- write a message to users SYNOPSIS
wall [-n] [-t TIMEOUT] [file] DESCRIPTION
Wall displays the contents of file or, by default, its standard input, on the terminals of all currently logged in users. The command will cut over 79 character long lines to new lines. Short lines are white space padded to have 79 characters. The command will always put carriage return and new line at the end of each line. Only the super-user can write on the terminals of users who have chosen to deny messages or are using a program which automatically denies messages. Reading from a file is refused when the invoker is not superuser and the program is suid or sgid. OPTIONS
-n, --nobanner Supress banner -t, --timeout TIMEOUT Write timeout to terminals in seconds. Argument must be positive integer. Default value is 300 seconds, which is a legacy from time when people ran terminals over modem lines. -V, --version Output version and exit. -h, --help Output help and exit. SEE ALSO
mesg(1), talk(1), write(1), shutdown(8) HISTORY
A wall command appeared in Version 7 AT&T UNIX. AVAILABILITY
The wall command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. util-linux April 2011 util-linux
All times are GMT -4. The time now is 04:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy