05-01-2010
Thanks Turk,
Spent the week reading the sites recommended, still find it confusing but have now massively improved the script to incorporate other searches, not sure if its the best practise but im getting somewhere, thanks for the helpful advise.
Jeffers
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi, this is my first post so here goes.....
I need help... I am trying to write a script to produce some stats based on a number of searches in a log file. Now i know how to do this using multiple variables which are really just greps, but I want a more efficent way of doing this as my poor... (1 Reply)
Discussion started by: ARwebble
1 Replies
2. Shell Programming and Scripting
I'm using perl to do a grep of each line in a vendor file and find its occurrences in a specific directory. Any values found is saved in @dir.
.....(file opened, etc.)
....
while ($line=<FILE>){
@dir = `grep $line * `;
}
It's the specific usage of the system grep that I'm having... (7 Replies)
Discussion started by: gavineq
7 Replies
3. Shell Programming and Scripting
OK here's the situation:
I have got these lines which I have got to parse.
If the line contains a particular string and any element from a previously defined array I need to take that particular line and do some further processing.
if ((grep(/$_/,$1)) && (grep($pattern,@myarr)))
{
#Do... (2 Replies)
Discussion started by: King Nothing
2 Replies
4. Shell Programming and Scripting
$ grep edge test_1 |sort|uniq >result.txt
$more result.txt
edge-a-pas01.com 10.12.10.11
edge-b-pas02.com 10.12.10.12
edge-c-pas03.com 10.12.10.50
edge-d-pas03.com 10.12.10.10
how do we execute the above grep command using perl?
Thanks in advance. (3 Replies)
Discussion started by: sureshcisco
3 Replies
5. Shell Programming and Scripting
Hello
I want to grep a line from a file saved in some directory.
Can anyone please correct the code below:
#!/usr/bin/perl -w
$file = "/home/output.txt"
$grep_line = "closing zip for topic";
`grep $grep_line* $file`; (1 Reply)
Discussion started by: sureshcisco
1 Replies
6. Shell Programming and Scripting
Hi All i have this script that uses glob to look in /var/log/messages.*
my @messagefiles = glob "/var/log/messages.*";
and the code that uses it is this
grep { /NVRM: Xid/ } @messages)
but this spits out this
/var/log/messages-20111030:Oct 25 13:43:04 brent kernel: NVRM:... (10 Replies)
Discussion started by: ab52
10 Replies
7. Shell Programming and Scripting
Im storing multiple functions in a varaible called $check...
The variable check contains the following:
a()
b()
c()
...
..etc
now im checking individually which function is kept in which file using GREP
if ( grep \$check \i, <FILE> )
The problem is im getting the output for the... (1 Reply)
Discussion started by: rajkrishna89
1 Replies
8. Shell Programming and Scripting
Hi,
Can anybody let me know how this grep will work.
The input and output is not known.
Also can you give me the details of any link where i can find clearly about grep
Thanks in advance (1 Reply)
Discussion started by: irudayaraj
1 Replies
9. Shell Programming and Scripting
hello Everyone i am a newbie.
i have a file which contains the following
E:\gtmproj\script\i486_nt\obj\check_geomtools.exe: o:\portsrc\spg\system_1\i486_nt\advapps\TK-2\objmt\winclockmtq.lib
E:\gtmproj\script\i486_nt\obj\check_geomtools.exe:... (12 Replies)
Discussion started by: Rashid Khan
12 Replies
10. Shell Programming and Scripting
I have an file which have data in lines as follows
ad, findline=24,an=54,ab=34,av=64,ab=7989,ab65=34,aj=323,ay=34,au=545,ad=5545
ab,abc,an10=23,an2=24,an31=32,findline=00,an33=23,an32=26,an40=45,ac23=5,ac=87,al=76,ad=26... (3 Replies)
Discussion started by: deepKrish
3 Replies
LEARN ABOUT DEBIAN
redshift
REDSHIFT(5) REDSHIFT.CONF(5) REDSHIFT(5)
NAME
redshift.conf - configuration file for redshift and gtk-redshift
DESCRIPTION
A configuration file with the name `redshift.conf' can optionally be placed in `~/.config/'. The file has standard INI format. General pro-
gram options are placed under the `redshift' header, while options for location providers and adjustment methods are placed under a header
with the name of that provider or method. General options are:
temp-day = integer
Daytime temperature
temp-night = integer
Night temperature
transition = 0 or 1
Disable or enable transitions
brightness-day = 0.1-1.0
Screen brightness at daytime
brightness-night = 0.1-1.0
Screen brightness at night
gamma = R:G:B
Gamma adjustment to apply
adjustment-method = name
Select adjustment method. Options for the adjustment method can be given under the configuration file heading of the same name.
location-provider = name
Select location provider. Options for the location provider can be given under the configuration file heading of the same name.
Options for location providers and adjustment methods can be found in the help output of the providers and methods.
EXAMPLE
Example for Copenhagen, Denmark:
$ redshift -l 55.7:12.6 -t 5700:3600 -g 0.8 -m vidmode -v
An example configuration file with the same effect as the above command line:
[redshift]
temp-day=5700
temp-night=3600
gamma=0.8
adjustment-method=vidmode
location-provider=manual
AUTHOR
redshift was written by Martin Koelewijn and Jon Lund Steffensen.
This manual page was created by Franziska Lichtblau <rhalina@old-forest.org> for the Debian project (and may be used by others).
redshift 1.7 June 2012 REDSHIFT(5)