I have a log file with over 500000 lines and I want to use sed command to filter through the file and delete the first 5000 lines.
I have tried
sed -e '1,5000d' fileA.
where d is delete but this does not work. Any ideas ?
Regards
dodo14 :o (1 Reply)
Hi,
I'm trying to use sed to process some files on Macs running OSX. Anyone know anything about Macs and sed?
Here's the problem
sed 's/^/ /g' test_file > endfile
(there are spaces betwen the second and third /, but the forum software compresses them)
This should put spaces at... (3 Replies)
i need a sample unix awk/sed program to replace param3 in a file.
i have sample file a.dat with the following format/length (week 8, sku 20, store 20 and qty 8). all store id's which end with _2 needs to be replaced with div id 2. all store id's which end with _1 needs to be replaced with div id... (4 Replies)
hello,
i have a csh file that calls a program and stores the output in a variable. the output is: \*\%VFT\$1\\3
as you can see there is a backslash before every non alphanumeric character. i save this output and then use SED to replace a word in a file with the output that i got.
... (3 Replies)
hi i want to append the number in each file,but when i ran this command:-
sed -i "1i 50" filename
its giving error sed: illegal option -- i in HP unix
but its working in linux.
any advice !!!!!!!!! (6 Replies)
Please help on the usage of sed in unix.
The questions are below :
1. how to display a particular word in a file using sed
2. how to replace a single letter in a word using sed
ex : in a file, all the 'ram' should be replaced by 'Ram'
3. i want to display a particular word from file... (1 Reply)
Hi,
I am a new student learning about Unix. Can anyone help with the following sed command. What would this command do?
sed -n -e '/^s/p'
Any help you can provide would be a big help.
Thanks in advance! (2 Replies)
I have a text file containing multiple lines like
password="&test.";
password="xyz";
password='write some';
password="&testwrite.";
today='o1jan2017'd;
-----------------
------------------
I don't want to replace the string value which are starting with & for Password variable... (3 Replies)
Discussion started by: harshabag
3 Replies
LEARN ABOUT OSF1
deroff
deroff(1) General Commands Manual deroff(1)NAME
deroff - Deletes neqn, nroff, and tbl constructs
SYNOPSIS
deroff [-i | -l] [-kpuw] [-ma | -me | -mm | -ms] file...
deroff [-i | -l] [-kpuw] -mm-ml file...
The deroff command reads the specified files (or standard input by default), removes all nroff requests, macro calls, backslash constructs,
eqn constructs (between and lines and between delimiters), and tbl descriptions, replacing many of them with spaces or blank lines, and
writes the remainder of the file to standard output.
OPTIONS
Suppresses processing of included files (.so and Keeps blocks of text specified by requests or macros; for example, the request. Sup-
presses processing of included files whose names begin with /usr/lib (such as macro files in /usr/lib/tmac). Interprets man macros only.
Interprets me macros only. Ignores mm macros and deletes mm list structures. The -mm option must be specified with this option. Inter-
prets ms and mm macros only. Interprets ms macros only. Performs special paragraph processing. Removes _ and in underlined and
boldfaced words. Automatically sets the -w option. Formats output into a word list, containing one word per line, with all other charac-
ters deleted.
In text, a word is any string that contains at least two letters and is composed of letters, digits, ampersands (&), and apostrophes (').
In a macro call, a word is a string that begins with at least two letters and contains a total of at least three letters. Delimiters are
any characters other than letters, digits, ampersands, and apostrophes.
Trailing ampersands and apostrophes are removed from words.
DESCRIPTION
The deroff command normally follows chains of included files (.so and requests) and processes those files. If a file was already included,
a naming it is ignored and a
deroff(1)