Hi there,
may someone easily help me on this :
I want to insert a text in a specific line number like :
linenumb2start=`cat memory_map.dld | nl -ba | egrep -i "label" | cut -f1`
line2insert=`expr $linenumb2start + 2`
and now I need to replace something like {} with {comment} at... (8 Replies)
Hi,
I have the following example string:
today_is_a_good_day.txt
The character "_" inside the string can sometimes be more or less. The solution for every string equal the count of "_" should be alway the rest after the last underline character.
Result: day.txt
I want to use awk... (5 Replies)
Hi
I want to extract certain text between two line numbers like
23234234324 and
54446655567567
How do I do this with a simple sed or awk command?
Thank you.
---------- Post updated at 06:16 PM ---------- Previous update was at 05:55 PM ----------
found it:
sed -n '#1,#2p'... (1 Reply)
Hi ,
I have a huge file like this
=245 this is testing
=035 abc123
=245 this is testing1
=035 abc124
=245 this is testing2
=035 abc125
=035 abc126
=245 this is testing3
here i have to pull out those lines having two =035 instead of alternative 035 and 245 i.e extract... (18 Replies)
Hello,
I'm new to using AWK and would be grateful for some basic advice to get me started.
I have a file consisting of 10 fields. Initially I wish to calculate the number of . , ~ and ^ characters in the 9th field ($9) of each line. This particular string also contains alphabetical... (6 Replies)
Hello,
I have a file with over 100,000 lines. I would like to be able extract 5000 lines at a time and give it as an input to another program.
sed -n '1,5000p' <myfile> > myOut
Similarly for
5001-10000
10001-15000
....
How can I do this in a loop?
Thanks,
Guss (5 Replies)
Hi All,
I want to extract the lines from file1 by using the index numbers from file2. In example,
cat file1.txt
265 ABC 956 ...
698 DFA 456 ...
456 DDD 145 ...
125 DSG 154 ...
459 CGB 156 ...
490 ASF 456 ...
484 XFH 489 ...
679 hgt 481 ...
111 dfg 986 ...
356 vhn 444 ...... (7 Replies)
I have the following script that will print column 4 ("25") when column 1 contains "123". However, I need to ignore the alpha characters that are contained in the input file. If I were to ignore the characters my output would be column 3.
What is the best way to print my column of interest... (3 Replies)
Hi All,
i would like to get some help regarding extracting certain characters from a line grepped.
blahblah{1:F01IRVTUS30XXXX0000000001}{2:I103IRVTDEF0XXXXN}{4:blah
blahblah{1:F01IRVTUS30XXXX0000000001}{2:I103IRVTDEF0XXXXN}{4:blah... (10 Replies)
Discussion started by: mad man
10 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)