Sponsored Content
Full Discussion: sed delete option
Top Forums Shell Programming and Scripting sed delete option Post 302518684 by zorrox on Sunday 1st of May 2011 08:25:21 AM
Old 05-01-2011
Thanks mirni. Your code works very well. You the best.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

sed option to delete two words within a file

Could someone please help me with the following. I'm trying to figure out how to delete two words within a specific file using sed. The two words are directory and named. I have tried the following: sed '//d' sedfile sed '//d' sedfile both of these options do not work..... ... (4 Replies)
Discussion started by: klannon
4 Replies

2. UNIX for Advanced & Expert Users

rsync with the --delete option.

Tell me this - set me straight! the --delete option says "delete files that don't exist on the sending side" Does this mean and only mean that it will delete files from the DESTINATION that DON'T EXIST on the sending side? :confused: (2 Replies)
Discussion started by: sallender
2 Replies

3. UNIX for Dummies Questions & Answers

rsync with the --delete option

Tell me this - set me straight! The --delete option says "delete files that don't exist on the sending side" Does this mean and only mean that it will delete files from the DESTINATION that DON'T EXIST on the sending side? :confused: (1 Reply)
Discussion started by: sallender
1 Replies

4. Solaris

option to delete .tar file while extracting

Is there an option in tar which deletes the .tar file as soon as it is successfully extracted. (5 Replies)
Discussion started by: vickylife
5 Replies

5. UNIX for Dummies Questions & Answers

sed -i option example

Can anyone give detailed and example for sed -i option. Where can we use this option?:) (3 Replies)
Discussion started by: gwgreen1
3 Replies

6. Shell Programming and Scripting

sed 'b' option

Hi, What does the following command do on files? sed '1b; $d' To me it just deletes the last line of the file. If so what is the significance of sed's 'b' option? Thanks (1 Reply)
Discussion started by: royalibrahim
1 Replies

7. Shell Programming and Scripting

sed with -e option

sed "s/^/8,A1,$dat,id2_3,/g" -e sed "s/$/,,,,,,,,,,,/g" temporary wn m running this script m getting a error... plz help me with this.... O/p sed: -e expression #1, char 3: unterminated `s' command ---------- Post updated at 11:35 AM ---------- Previous update was at 11:33 AM... (7 Replies)
Discussion started by: nikhil jain
7 Replies

8. Shell Programming and Scripting

sed -n option

Hi i am facing problem with sed -n option could you please help me on this, i have a file test the contents of the file is width="75">10/0 4/12</td>^M><a href='courtorders/100412zr.pdf' target="_blank">Miscellaneous Order</a></td>^M width="75">10/01/12</td>^M><a href='courtorde... (8 Replies)
Discussion started by: ragilla
8 Replies

9. Shell Programming and Scripting

Rsync with delete option

Hi, I have restored backup of a directory on one server to another server. But there may be some differences because the date on which backup was taken is 5 days back, so I want to delete the files on target if something is not in sync, but do not want to copy it all, since this is already... (1 Reply)
Discussion started by: solaris_1977
1 Replies

10. Shell Programming and Scripting

sed not applying /d "delete line" option

So I'm on an AIX machine. And sed is not applying /d "delete line" option when I also include match word options \< and \> examples... echo cat | sed '/\<cat\>/d'will return cat for some reason echo cat | sed "/\<cat\>/d"will also still return cat. Of course i can just run echo cat... (9 Replies)
Discussion started by: escooter87
9 Replies
fmt(1)								   User Commands							    fmt(1)

NAME
fmt - simple text formatters SYNOPSIS
fmt [-cs] [-w width | -width] [inputfile...] DESCRIPTION
fmt is a simple text formatter that fills and joins lines to produce output lines of (up to) the number of characters specified in the -w width option. The default width is 72. fmt concatenates the inputfiles listed as arguments. If none are given, fmt formats text from the standard input. Blank lines are preserved in the output, as is the spacing between words. fmt does not fill nor split lines beginning with a `.' (dot), for compatibility with nroff(1). Nor does it fill or split a set of contiguous non-blank lines which is determined to be a mail header, the first line of which must begin with "From". Indentation is preserved in the output, and input lines with differing indentation are not joined (unless -c is used). fmt can also be used as an in-line text filter for vi(1). The vi command: !}fmt reformats the text between the cursor location and the end of the paragraph. OPTIONS
-c Crown margin mode. Preserve the indentation of the first two lines within a paragraph, and align the left margin of each subsequent line with that of the second line. This is useful for tagged paragraphs. -s Split lines only. Do not join short lines to form longer ones. This prevents sample lines of code, and other such formatted text, from being unduly combined. -w width | -width Fill output lines to up to width columns. OPERANDS
inputfile Input file. ENVIRONMENT VARIABLES
See environ(5) for a description of the LC_CTYPE environment variable that affects the execution of fmt. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
nroff(1), vi(1), attributes(5), environ(5) NOTES
The -width option is acceptable for BSD compatibility, but it may go away in future releases. SunOS 5.10 9 May 1997 fmt(1)
All times are GMT -4. The time now is 11:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy