08-18-2004
Personally, I like to pipe it through less +G. This way I can hit b to go up a few more lines if I need to.
ls -l | less +G
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
My question is if the simple but powerful shell scripts can extract data from a big data file by using a list of identifier. I used to put everything in the database and do joining, which sounds stupid but only way I knew. For example, my data file looks like,
... (3 Replies)
Discussion started by: mskcc
3 Replies
2. UNIX for Dummies Questions & Answers
Hello!
I have a script that is (among other things) doing the following:
list=/tmp/list1.txt
ncftpls -u <user> -p <password> -x "-l1" server.domain.tld > $list
cat $list | nl
echo "Choose file: "
read file
cat /tmp/list1.txt | nl | grep $file | sed -e "s/$file//g" -e "s/ //g" | column -t... (8 Replies)
Discussion started by: noratx
8 Replies
3. Shell Programming and Scripting
Sorry for the duplicate thread this one is similar to the one in
https://www.unix.com/shell-programming-scripting/88132-awk-sed-script-read-values-parameter-files.html#post302255121
Since there were no responses on the parent thread since it got resolved partially i thought to open the new... (4 Replies)
Discussion started by: rajan_san
4 Replies
4. UNIX for Advanced & Expert Users
hi there,
i have to read lines from the file, where the line is just above the pattern am looking for
typically this looks like this
<time-stamp>|-----
<pattern am searching >......
<time-stamp>|.....
<some garbage >
....
the log file is big
wc -l ~/log/ompe.log.20081203... (8 Replies)
Discussion started by: kiranreddy1215
8 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I want to list filenames instead of lines when i search in compresed files for a string.
#gzcat *.gz | grep -l 12345
gives me:
<stdin>
Anyone got a solution on this problem? (2 Replies)
Discussion started by: HugoH
2 Replies
6. Shell Programming and Scripting
Hello,
I was wondering if there was an easy way to take lines from a single-column list, and remove them from a second single-column list. For example, I want to remove the contents of list 1 from list 2. How would I do this?
Contents of list 1:
server1a
server2b
server3c
server4a... (2 Replies)
Discussion started by: LinuxRacr
2 Replies
7. UNIX for Dummies Questions & Answers
Evening all !
I would like to ask your expertise on how to accomplish the following ;
I have 2 lists, and would like each line from list2 to be appended to each line in list1, resulting in list3 ;
List1;
alpha
beta
charlie
List2;
one
two
three (4 Replies)
Discussion started by: TAPE
4 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have a requirement like, I have a list of pattens in a file say pattern.txt,
PHC111
PHC113
and in another file called master.lst i have entries like,
PHC111
a
b
PHC112
a
PHC113
b
c
PHC114
d
e (5 Replies)
Discussion started by: rbalaj16
5 Replies
9. Shell Programming and Scripting
Not quite sure how to explain what I need to do (or how to title the post!) so will try and show it!
Basically I have a list of 'modules' which takes the form seen below, where there can be a module name, module type and module version (a module may not have each of those and could in theory... (2 Replies)
Discussion started by: chrissycc
2 Replies
10. UNIX for Dummies Questions & Answers
Hello all- New to this forum, and relatively new to using grep at the Terminal command line to work with regular expressions. I've got a background in math and some programming experience, so it's not been too difficult to learn the basics of searching through my word lists for particular types of... (13 Replies)
Discussion started by: dtalvacchio
13 Replies
LEARN ABOUT SUSE
mrtg-squid
MRTG-SQUID(1) mrtg MRTG-SQUID(1)
NAME
mrtg-squid - using mrtg to monitor Squid
DESCRIPTION
Squid 2.3 knows SNMP and you can therefore use mrtg to monitor it quite easily.
I have made some modifications to mrtg which simplify this. My work is based on earlier modification made by: matija.grabnar@arnes.si and
kostas@nlanr.net.
MODIFICATIONS
I added new code for displaying correct units to the previous patches "perminute" and "perhour" ("option" tokens), which allows other mea-
surement in addition to "persecond".
Then I created a new option token "dorelpercent" which allows the calculation of the percentage of IN-stream / OUT-stream on the fly and
then displays it on a fixed scale from 0% to 100%. For my requirements, this does good work. Maybe someone wants a floating scale. It
should not be a problem to implement it, too (but give me an option to keep my fixed scale). If IN-stream is always less than OUT-stream
both lines (OUT-stream and relative percent) are always displayed on top of IN-stream bulk. Otherwise this option makes no sense. With this
option you can display hitrates, errorrates (for router monitoring: rel. droprates) easily now.
If you use this options please consider that you need a 5th colourname/value pair in your Colours statements!
Due to some discussion on this list, I have implemented two tokens too:
"kilo" and "kMG"
"kilo" should contain the value of k (1000 or 1024), where 1000 is the default.
"kMG" is a comma separated list of multiplier prefixes, used instead of "", "k", "M", "G", "T" on the MRTG display. Leave the place free,
if you want no prefix.
Also an incomplete list of OIDs for the new SQUID release is added.
I hope you enjoy it.
CONFIG EXAMPLE
You can measure responsetimes in ms and display it with MRTG correctly with:
kMG[measure-ms]: m,,k,M,G,T
short[measure-ms]: s
You can display now MB/s as 1024*1024 B/s with:
kilo[volume]: 1024
A sample config for squid:
Target[proxy-hit]: cacheHttpHits&cacheProtoClientHttpRequests:public@proxy
Title[proxy-hit]: HTTP Hits
PageTop[proxy-hit]: <H2>proxy Cache Statistics: HTTP Hits / Requests</H2>
Suppress[proxy-hit]: y
LegendI[proxy-hit]: HTTP hits
LegendO[proxy-hit]: HTTP requests
Legend1[proxy-hit]: HTTP hits
Legend2[proxy-hit]: HTTP requests
YLegend[proxy-hit]: perminute
ShortLegend[proxy-hit]: req/min
Options[proxy-hit]: nopercent, perminute, dorelpercent
Target[proxy-srvkbinout]: cacheServerInKb&cacheServerOutKb:public@proxy
Title[proxy-srvkbinout]: Cache Server Traffic In / Out
PageTop[proxy-srvkbinout]: <H2>Cache Statistics: Server traffic volume (In/Out) </H2>
Suppress[proxy-srvkbinout]: y
LegendI[proxy-srvkbinout]: Traffic In
LegendO[proxy-srvkbinout]: Traffic Out
Legend1[proxy-srvkbinout]: Traffic In
Legend2[proxy-srvkbinout]: Traffic Out
YLegend[proxy-srvkbinout]: per minute
ShortLegend[proxy-srvkbinout]: b/min
kMG[proxy-srvkbinout]: k,M,G,T
kilo[proxy-srvkbinout]: 1024
Options[proxy-srvkbinout]: nopercent, perminute
AUTHOR
Andreas Papst <andreas.papst@univie.ac.at> Dirk-Luder Kreie <deelkar@gmx.de>
2.16.2 2008-05-16 MRTG-SQUID(1)