Hi
I want to do a regex test and branch based on the test result, but this doesn't seems to work :confused:
if \) ]]
then
echo success
else
echo failed
fi (1 Reply)
I'm not talking about the assembly instruction TAS, a better name could be check-and-set :) Anyway, is there a way to simplify the following
if ; then VAR="something"; fi
I have ~20 variables that should be test-and-set like this, and it really looks lame. (2 Replies)
Hello all,
I would like some help to find the regexp to test that a word does not contains anything than the character set of printable strings.
Especially the word should not contain a underscore.
echo "$word" | grep "( \'\(\)+,-\.:=\?)+"
if
then
echo success
else
echo failed... (2 Replies)
I'm almost pulling out my hair trying to figure out what's wrong with this... there's no reason I can see that it shouldn't be working. It seems that the code acts as though the conditional statement is true no matter what - I've even tried removing the negation operator, but it always goes into... (5 Replies)
I want to test if my host can connect to any of the following 10 hosts (192.168.1.0 to 192.168.1.9)
I didnt know which command i should use, so i chose ping. (i wonder if i should use tracepath or sth else)
my code is the following:
#!/bin/bash
clear
firstPart="192.168.1"
maxNum="9"
... (2 Replies)
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hello,
We have to configure servers with a range of IPs which is in itself a subject for another script assistance request -but- we have run into quite a few IP ranges with routing problems lately.
I've been trying to figure out the best way to test a range of IPs, I mean, manually it's not... (4 Replies)
Experts,
I have a bash shell script that generates 2 variables that have the current minute and a minute from a log file. Can someone please show me the best way to test if the minutes stray by 5. So basically if:
This is ok:
Last Fitting Min
=============
02
Current Minute
=============... (2 Replies)
Hello, can you please help me because I am totally confused with a simple script:
#!/bin/bash
] || ] && echo "Good Morning"
] || ] && echo "Good Night"
For me, these two strings are indentical: false || false and there is no point to execute echo command.
But the run result is... (5 Replies)
I want to check (using bash condition test function) if string contains three spaces, ignoring last three spaces at the end of string.
string_to_report='foo bar foo bar '
string_to_ignore='foo bar ' (8 Replies)
Discussion started by: useretail
8 Replies
LEARN ABOUT SUSE
gtk2::printsettings
Gtk2::PrintSettings(3) User Contributed Perl Documentation Gtk2::PrintSettings(3)NAME
Gtk2::PrintSettings
HIERARCHY
Glib::Object
+----Gtk2::PrintSettings
METHODS
printsettings = Gtk2::PrintSettings->new
printsettings = Gtk2::PrintSettings->new_from_file ($file_name)
o $file_name (localized file name)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.12
printsettings = Gtk2::PrintSettings->new_from_key_file ($key_file, $group_name)
o $key_file (Glib::KeyFile)
o $group_name (string or undef)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.12
$settings->foreach ($func, $data=undef)
o $func (scalar)
o $data (scalar)
string or undef = $settings->get ($key)
o $key (string)
$settings->set ($key, $value)
o $key (string)
o $value (string or undef)
boolean = $settings->has_key ($key)
o $key (string)
$settings->load_file ($file_name)
o $file_name (string)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.14
$settings->load_key_file ($key_file, $group_name)
o $key_file (Glib::KeyFile)
o $group_name (string or undef)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.14
double = $settings->get_printer_lpi
Since: gtk+ 2.16
$settings->set_printer_lpi ($lpi)
o $lpi (double)
Since: gtk+ 2.16
integer = $settings->get_resolution_x
Since: gtk+ 2.16
$settings->set_resolution_xy ($resolution_x, $resolution_y)
o $resolution_x (integer)
o $resolution_y (integer)
Since: gtk+ 2.16
integer = $settings->get_resolution_y
Since: gtk+ 2.16
$settings->to_file ($file_name)
o $file_name (localized file name)
May croak with a Glib::Error in $@ on failure.
Since: gtk+ 2.12
$settings->to_key_file ($key_file, $group_name)
o $key_file (Glib::KeyFile)
o $group_name (string or undef)
Since: gtk+ 2.12
$settings->unset ($key)
o $key (string)
SEE ALSO
Gtk2, Glib::Object
COPYRIGHT
Copyright (C) 2003-2008 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
perl v5.12.1 2010-07-05 Gtk2::PrintSettings(3)