I'm a newbie to the world of programming and so i decided to learn perl. I'm working on a project that telnets into a Cisco router and eliminates a specific line but i can't seem to get the thing to work. I dump the output into an array but i'm having a difficult time looking for the string in the array. Any suggestions? Here is the code:
Once the script logs into the router it executes a "sh run | inc connect " and dumps an output like so into an array.
The next job is to search for the connect sgsn Serial1/0:6 701 l2transport to see if it has it in the array and if it does i want the script to type into the prompt "no connect sgsn Serial1/0:6 701 l2transport"
Last edited by pludi; 10-15-2009 at 02:51 PM..
Reason: code tags, please...
Hey guys,
I have this file generated by me... i want to create some HTML output from it.
The problem is that i am really confused about how do I go about reading the file.
The file is in the following format:
TID1 Name1 ATime=xx AResult=yyy AExpected=yyy BTime=xx BResult=yyy... (8 Replies)
Hello everyone,
Just started UNIX today! In our school we use solaris. I just want to know how do I setup Solaris 10 not the GUI one, the one where you have to type the commands like ECHO, ls, pwd, etc... I have windows xp and I also have vmware.
I hope I am not missing anything! :p (4 Replies)
Hello everyone,
I am having to do a lot of perl scripting these days and I am learning a lot.
I have this problem
I want to move files from a folder and all its sub folders to one parent folder, they are all .gz files..
there is folder1\folder2\*.gz
and there are about 50 folders... (1 Reply)
Hi,
I am new to programming and also to perl..But i know 'perl' can come to my rescue, But I am stuck at many places and need help..any small help is much appreciated... below is the description of what i intend to acheive with my script.
I have a files named in this format... (13 Replies)
Hi Friends
Im so confused with using 'for' loop in ksh. I have a xml like the following:
<serviceProvider>
<serviceProviderID>1</serviceProviderID>
<serviceProviderName>Balesh</serviceProviderName>
<serviceFeeAmount>30.00</serviceFeeAmount>
</serviceProvider>... (2 Replies)
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
Hi
I'm just messing around with bash and trying to learn it because I have a course next semester dealing with OS design where we need to know how to use SSH client and either bash or ksh. I've never done shell scripting before.
I just started today and I was wondering how parsing files... (1 Reply)
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
Hello guys,
I am a newbie to all of this - I'd like some help with a file I have. It's a ~100mb CSV file with approximately 30 columns.
What I'd like to do is to search through the file and REMOVE any lines with a certain case insensitive string in any of the columns:
So my file looks... (4 Replies)
Discussion started by: Lokhtar
4 Replies
LEARN ABOUT PHP
vop_fsync
VOP_FSYNC(9) BSD Kernel Developer's Manual VOP_FSYNC(9)NAME
VOP_FSYNC -- flush file system buffers for a file
SYNOPSIS
#include <sys/param.h>
#include <sys/vnode.h>
int
VOP_FSYNC(struct vnode *vp, int waitfor, struct thread *td);
DESCRIPTION
This call flushes any dirty file system buffers for the file. It is used to implement the sync(2) and fsync(2) system calls.
Its arguments are:
vp The vnode of the file.
waitfor Whether the function should wait for I/O to complete. Possible values are:
MNT_WAIT Synchronously wait for I/O to complete.
MNT_NOWAIT Start all I/O, but do not wait for it.
MNT_LAZY Push data not written by file system syncer.
td The calling thread.
The argument waitfor is either MNT_WAIT or MNT_NOWAIT and specifies whether or not the function should wait for the writes to finish before
returning.
LOCKS
The file should be locked on entry.
RETURN VALUES
Zero is returned if the call is successful, otherwise an appropriate error code is returned.
ERRORS
[ENOSPC] The file system is full.
[EDQUOT] Quota exceeded.
SEE ALSO vnode(9)AUTHORS
This manual page was written by Doug Rabson.
BSD July 24, 1996 BSD