you have inconsistent format of the 'movie names' and "move name". Here's how to accommodate both. (Somehow gawk's RS='' doesn't work as described in 'man gawk' - makes the code a bit hairy):
Hi,
I have the following data in the format as shown (note: there are more than 1 blank spaces between each field and the spaces are not uniform, meaning there can be one blank space between field1 and field2 and 3 spaces between field3 and field4, in this example, # are the spaces in between... (19 Replies)
can't figure out a way to delete multiple empty lines but keep single empty lines in a file, file is like this
#cat file
1
2
3
4
5
6
-
What I want is
1
2 (6 Replies)
Hi,
I want to write a sed script which from
batiato:
batiato/giubbe:
pip_b.2.txt
pip_b.3.txt
pip_b.3mmm.txt
bennato:
bennato/peterpan:
123.txt
consoli:
pip_a.12.txt
daniele: (2 Replies)
Hi Guys,
I have a file in which each set of records are separated by two blank line. I want to replace it with a single blank line.
Can you guys help me out?
Regards,
Magesh (9 Replies)
why does sed 's/.* //' show the last word in a line
and
sed 's/ .*//' show the first word in a line? How is that blank space before or after the ".*" being interpreted in the regex?
i would think the first example would delete the first word and the next example would delete the second... (1 Reply)
I've got a report I need to make easier to read Using sh on HP-UX 11.12.
In short, I want to search for a regular expression and when found, examine the next line to see if it's blank. If so, then delete both lines. If not blank, move on to the next regexp. Repeat.
So far I've got:
... (7 Replies)
Hi
I am trying to filter some data using awk. I have a statement-
awk 'BEGIN { FS = "\n" ; RS = "" } { if ( $6 = "City: " ) { print "City: Unknown" } else { print $6 } }'`
The $6 values are
City: London
City: Madrid
City:
City: Tokyo
This expression seems to catch all the lines... (4 Replies)
Hello,
I have a file that I want to be able to insert a new line before every instance of a regex. I can get it to do this for each line that contains the regex, but not for each instance.
Contents of infile:
Test this 1...
Test this 2...
Test this 3... Test this 4... Test this... (2 Replies)
Dear All,
In a CSV file, say that a given column has been extracted. In that column, information is missing (i.e. blank lines appear). I would like to replace the blank lines by the last valid line (not blank) previously read.
For example, consider the extract below:
123
234
543
111... (7 Replies)
Discussion started by: bagvian
7 Replies
LEARN ABOUT DEBIAN
gt5
gt5(1) General Commands Manual gt5(1)NAME
gt5 - a diff-capable 'du-browser'
SYNOPSIS
gt5 [ dir | file | dir file | file file2 ] [options]
DESCRIPTION
gt5 reads the output of du, compares it with a du-log saved by the last run, converts it into HTML and opens the resulting file with a
textbrowser.
If files are given on the commandline they are expected to be (optionally gzip/bzip2-compressed) logfiles of du -akx /some/dir. It is up
to you to take care that the given directories/files represent the same directory. gt5 will show lots of new files if you don't. ;-)
OPTIONS --cut-at float
Files and directories that are below float percent of their parents are not shown. Default is 0.1, gt5 will accept values between
0.01 and 30.
--debug
Turn on debug. Generate HTML files and do not run browser.
--diff-dir directory
Use directory instead of ~/.gt5-diffs/ to read/store du-logs. This switch is ignored if gt5 is only used with files.
--discard
Do not save the current state, in other words: be able to diff against the old state again. This feature is disabled if gt5 is only
used with files.
--help Display brief help.
--link-files
Also insert links to files to access them from within gt5. This can be very handy if your browser is configured to handle the files
MIME-type correctly. This feature is disabled if gt5 is only used with files.
--max-depth int
Do not show anything below a depth of int directories. Default is 5 (also see BUGS below).
--max-lines int
Only consider the int biggest files and directories within the output of du.
--no-diffs
Use this if you are not interested in the history of the directories processed, for example in /tmp.
--save-as file
DEPRECATED, use du -akx or du -ak (see --with-mounts), save the output to a file and run gt5 against one (ore two) of these files
later.
--save-state
Force saving current state, overwriting a previous --discard. (Some people seem to have gt5 aliased to 'gt5 --discard'.)
--verbose
Display messages.
--with-mounts
By default gt5 calls du with -akx to ignore mounted filesystems. Use this to inspect mounted partitions too, i.e. call du with -ak
HELPERS
If gawk or a textbrowser are missing and you want to install them into ~/bin (or /usr/local/bin if you have write access there), gt5 comes
with the following helpers:
--get-gawk
Download, compile and install a copy of gawk.
--get-links
Download, compile and install a copy of links.
--get-links2
Download, compile and install a copy of links2.
--get-elinks
Download, compile and install a copy of elinks.
TEXTBROWSERS
It is recommended to use links with gt5. Other textbrowsers are also possible but there are several good reasons why links is given prior-
ity over the others:
elinks:
links is much faster on startup/exit
lynx: does not honor a documents coloring
netrik:
no colors, unfavourable cursor navigation
retawq:
no colors, can't handle <a name>-tags
w3m: Version 0.5.2 and later are known to work. Older versions experienced unfavourable handling of <a name>-tag, unfavourable cursor
navigation and no colors
Only links/links2, elinks and lynx are now considered usable (and also chosen in that order). See ENVIRONMENT/GT5_BROWSER below.
FILES
~/.gt5.html
contains a copy of the last run
~/.gt5-diffs/
compressed du-logs are stored here
ENVIRONMENT
GT5_BROWSER
force using a (specific) textbrowser
GT5_CHARSET
force using a (specific) charset for HTML header instead of using $LANG
GT5_DEBUG_DIR
Directory where to write gt5.debug* data if --debug option is set.
BUGS
Directories at depth max-depth are not browsable and so look like files.
AUTHOR
Thomas Sattler <gt5 at gmx dot net>
SEE ALSO du(1), links(1), elinks(1), lynx(1)gt5 v1.4.0.1 July 2009 gt5(1)