10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to create a shell script to add a user and modify its comment field mentioned in a file.
1.
File value:-
username comment field value
xyz123 xyztesting
abc123 abctesting
def123 deftesting
2. i am using below loop to create user... (2 Replies)
Discussion started by: Anil
2 Replies
2. UNIX for Beginners Questions & Answers
I have the following script, and I want to assign the output ($10 and $5) from awk to N and L:
grdinfo data.grd | awk '{print $10,$5}'| read N L
output from gridinfo data.grd is: data.grd 50 100 41 82 -2796 6944 0.016 0.016 3001 2461. where N and L is suppose to be 3001 and 100. I use... (8 Replies)
Discussion started by: geomarine
8 Replies
3. UNIX for Beginners Questions & Answers
Hi Team,
I am trying to grep date in a file but it is not working
#!/bin/bash
d=`date "+ %Y%m%d %H:%M"`
cd /scripts
/bin/rm -f test1
cat /var/logs/File.txt.0 |grep $"d" >v.txt instead it is showing the complete file output.
kindly suggest how should i grep this variable
it works... (7 Replies)
Discussion started by: scriptor
7 Replies
4. Shell Programming and Scripting
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies
5. Shell Programming and Scripting
hi,
when we assign a variable inside a for loop or while loop in a shell script, does it loses its value after comming out of the loop. i am facing this issue.
can anyone help me?? (8 Replies)
Discussion started by: Little
8 Replies
6. Shell Programming and Scripting
Hi,
I'm trying to check if methods specified in a class have been added to the corrosponding interface.
My code below is giving me the following errors:
grep: function: No such file or directory
grep: import($zipfile): No such file or directory
grep: function: No such file or... (1 Reply)
Discussion started by: racshot65
1 Replies
7. Shell Programming and Scripting
Hi all
I run my program prog.c in the following way :
$ ./prog 1 > output.txt where 1 is a user defined initial value used by the program.
But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in different files.
Like
$ ./prog 1... (1 Reply)
Discussion started by: alice06
1 Replies
8. Shell Programming and Scripting
Dear All,
we have a command output which looks like :
Total 200 queues in 30000 Kbytes
and we're going to get "200" and "30000" for further process. currently, i'm using :
numA=echo $OUTPUT | awk '{print $2}'
numB=echo $OUTPUT | awk '{print $5}'
my question is : can I use just one... (4 Replies)
Discussion started by: tiger2000
4 Replies
9. Shell Programming and Scripting
I am a newbie to awk and c programming, however am not a unix newbie. However, I do need help with a kshell script I am writing. It is almost complete, the last step is killing me. Any help would be greatly appreciated. What I am trying to do is cat a text file that has usernames. Then, using... (2 Replies)
Discussion started by: synergy_texas
2 Replies
10. UNIX for Dummies Questions & Answers
Hi all,
I'm having some trouble with a shell script that I have put together to search our web pages for links to PDFs.
The first thing I did was:
ls -R | grep .pdf > /tmp/dave_pdfs.outWhich generates a list of all of the PDFs on the server. For the sake of arguement, say it looks like... (8 Replies)
Discussion started by: Dave Stockdale
8 Replies
IO::Async::Loop::Glib(3pm) User Contributed Perl Documentation IO::Async::Loop::Glib(3pm)
NAME
"IO::Async::Loop::Glib" - use "IO::Async" with Glib or GTK
SYNOPSIS
use IO::Async::Loop::Glib;
my $loop = IO::Async::Loop::Glib->new();
$loop->add( ... );
...
# Rest of GLib/Gtk program that uses GLib
Glib::MainLoop->new->run();
Or
$loop->loop_forever();
Or
while(1) {
$loop->loop_once();
}
DESCRIPTION
This subclass of "IO::Async::Loop" uses the "Glib::MainLoop" to perform read-ready and write-ready tests.
The appropriate "Glib::IO" sources are added or removed from the "Glib::MainLoop" when notifiers are added or removed from the set, or when
they change their "want_writeready" status. The callbacks are called automatically by Glib itself; no special methods on this loop object
are required.
CONSTRUCTOR
$loop = IO::Async::Loop::Glib->new()
This function returns a new instance of a "IO::Async::Loop::Glib" object. It takes no special arguments.
METHODS
There are no special methods in this subclass, other than those provided by the "IO::Async::Loop" base class.
$count = $loop->loop_once( $timeout )
This method calls the "iteration()" method on the underlying "Glib::MainContext". If a timeout value is supplied, then a Glib timeout will
be installed, to interrupt the loop at that time. If Glib indicates that any callbacks were fired, then this method will return 1 (however,
it does not mean that any "IO::Async" callbacks were invoked, as there may be other parts of code sharing the Glib main context. Otherwise,
it will return 0.
SEE ALSO
o Glib - Perl wrappers for the GLib utility and Object libraries
o Gtk2 - Perl interface to the 2.x series of the Gimp Toolkit library
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.14.2 2013-03-01 IO::Async::Loop::Glib(3pm)