Sponsored Content
Top Forums Shell Programming and Scripting Problem in redirecting ftp msgs to a log file Post 302318407 by hareeshkumaru on Thursday 21st of May 2009 12:48:03 PM
Old 05-21-2009
Essentially "<<End_of_input" in the statement says that the following lines will be input to the command ftp -nv $Machine till a similar string End_of_input is encountered.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

File Name Problem from FTP

Hi, there. I am new to UNIX and I am writing a script that it uses the FTP to get a list of the files from the FTP server, and compares this list with the local folder to check if the file already exists. If not exist, then it connects to the FTP server again to download the files The problem is... (1 Reply)
Discussion started by: czbtony
1 Replies

2. UNIX for Dummies Questions & Answers

UNIX FTP file problem

Hi, I am new to this forum. I have a problem and I ws hoping you guys can help me out here. the problem: I have a batch job running on a Unix Server, and it transfers files from the unix server to another server. the series of commands are as follows: > LS Listing the files > Logging into... (4 Replies)
Discussion started by: Vanilmirth
4 Replies

3. Shell Programming and Scripting

Redirecting stderr problem

% ls -ld /usr /foo ls: /foo: No such file or directory drwxr-xr-x 14 root wheel 512 May 18 02:49 /usr % ls -ld /usr /foo 1>/dev/null/ /dev/null/: Not a directory. % ls -ld /usr /foo 2>/dev/null/ /dev/null/: Not a directory. ^^Why why why doesn't this work for me. Furthermore, where is... (7 Replies)
Discussion started by: phpfreak
7 Replies

4. Solaris

troubleshooting log detailing symptoms/error msgs/fix actions for NIS+ client authent

summary found at bottom. to skip straight to action summary, ctrl+f for <summary> this initially started with trouble changing passwords due to client being unable to authenticate, this was further caused by missing client files. This was transparent to me, so this details the road I took,... (0 Replies)
Discussion started by: ProGrammar
0 Replies

5. Shell Programming and Scripting

FTP problem to find file

Hi everybody, i suddenly got in a requirement whereby: I have to create a script whereby I need to connect with a remote server with a FTP script and search whether a file named filename.txt or *.txt exists or not in the remote server. If it exists then my script has to return a value. ... (18 Replies)
Discussion started by: RubinPat
18 Replies

6. Shell Programming and Scripting

Pulling Ip's from log and redirecting to a file

Hi all, I am fairly new to scripting, but I do try and script as much as possible but the more advanced stuff does tend to boggle my mind a bit. I am at a bit of a loss with this one. I get entries in my DNS logs, like the below: I want to extract only the IP address, without the hashes... (5 Replies)
Discussion started by: codenjanod
5 Replies

7. Shell Programming and Scripting

I/O Redirection: how can I redirect error msgs to a temp file

Hi there, I just want to know how can I redirect error msgs returned from running a command (e.g. nslookup) and then only print out the correct output using an if statement?. I've tried the following: where $a is a list of IPs. but I got all the error msgs printed out to screen and... (9 Replies)
Discussion started by: Abdulelah
9 Replies

8. Shell Programming and Scripting

Perl :How to print the o/p of a Perl script on console and redirecting same in log file @ same time.

How can i print the output of a perl script on a unix console and redirect the same in a log file under same directory simultaneously ? Like in Shell script, we use tee, is there anything in Perl or any other option ? (2 Replies)
Discussion started by: butterfly20
2 Replies

9. Shell Programming and Scripting

problem in redirecting records using nawk

I am trying to redirect record to two files using nawk if-else. #Identify good and bad records and redirect records using if-then-else nawk -F"|" '{if(NF!=14){printf("%s\n",$0) >> "$fn"_bad_data}else{printf("%s\n",$0) >> $fn}}' "$fn".orig "$fn".orig is the source file name bad... (7 Replies)
Discussion started by: siteregsam
7 Replies

10. Shell Programming and Scripting

Redirecting stdout problem

I have a simple bash script that prints sth every 5 seconds. What I do is the following. I redirect the output of the script to a file, tail the file and see that it works and then from another console I delete the file where the output is redirected to. Even though I have deleted the file, the... (2 Replies)
Discussion started by: igurov
2 Replies
Glib::version(3pm)					User Contributed Perl Documentation					Glib::version(3pm)

NAME
Glib::version - Library Versioning Utilities SYNOPSIS
# require at least version 1.021 of the Glib module use Glib '1.021'; # g_set_application_name() was introduced in GLib 2.2.0, and # first supported by version 1.040 of the Glib Perl module. if ($Glib::VERSION >= 1.040 and Glib->CHECK_VERSION (2,2,0)) { Glib::set_application_name ('My Cool Program'); } DESCRIPTION
Both the Glib module and the GLib C library are works-in-progress, and their interfaces grow over time. As more features are added to each, and your code uses those new features, you will introduce version-specific dependencies, and naturally, you'll want to be able to code around them. Enter the versioning API. For simple Perl modules, a single version number is sufficient; however, Glib is a binding to another software library, and this introduces some complexity. We have three versions that fully specify the API available to you. Perl Bindings Version Perl modules use a version number, and Glib is no exception. $Glib::VERSION is the version of the current Glib module. By ad hoc convention, gtk2-perl modules generally use version numbers in the form x.yyz, where even yy values denote stable releases and z is a patchlevel. $Glib::VERSION use Glib 1.040; # require at least version 1.040 Compile-time ("Bound") Library Version This is the version of the GLib C library that was available when the Perl module was compiled and installed. These version constants are equivalent to the version macros provided in the GLib C headers. GLib uses a major.minor.micro convention, where even minor versions are stable. (gtk2-perl does not officially support unstable versions.) Glib::MAJOR_VERSION Glib::MINOR_VERSION Glib::MICRO_VERSION Glib->CHECK_VERSION($maj,$min,$mic) Run-time ("Linked") Library Version This is the version of the GLib C library that is available at run time; it may be newer than the compile-time version, but should never be older. These are equivalent to the version variables exported by the GLib C library. Glib::major_version Glib::minor_version Glib::micro_version Which one do I use when? Where do you use which version? It depends entirely on what you're doing. Let's explain by example: o Use the Perl module version for bindings support issues You need to register a new enum for use as the type of an object property. This is something you can do with all versions of the underlying C library, but which wasn't supported in the Glib Perl module until $Glib::VERSION >= 1.040. o Use the bound version for library features You want to call Glib::set_application_name to set a human-readable name for your application (which is used by various parts of Gtk2 and Gnome2). g_set_application_name() (the underlying C function) was added in version 2.2.0 of glib, and support for it was introduced into the Glib Perl module in Glib version 1.040. However, you can build the Perl module against any stable 2.x.x version of glib, so you might not have that function available even if your Glib module is new enough! Thus, you need to check two things to see if the this function is available: if ($Glib::VERSION >= 1.040 && Glib->CHECK_VERSION (2,2,0)) { # it's available, and we can call it! Glib::set_application_name ('My Cool Application'); } Now what happens if you installed the Perl module when your system had glib 2.0.6, and you upgraded glib to 2.4.1? Wouldn't g_set_application_name() be available? Well, it's there, under the hood, but the bindings were compiled when it wasn't there, so you won't be able to call it! That's why we check the "bound" or compile-time version. By the way, to enable support for the new function, you'd need to reinstall (or upgrade) the Perl module. o Use the linked version for runtime work-arounds Suppose there's a function whose API did not change, but whose implementation had a bug in one version that was fixed in another version. To determine whether you need to apply a workaround, you would check the version that is actually being used at runtime. if (Glib::major_version == 2 && Glib::minor_version == 2 && Glib::micro_version == 1) { # work around bug that exists only in glib 2.2.1. } In practice, such situations are very rare. METHODS
boolean = Glib->CHECK_VERSION ($required_major, $required_minor, $required_micro) o $required_major (integer) o $required_minor (integer) o $required_micro (integer) Provides a mechanism for checking the version information that Glib was compiled against. Essentially equvilent to the macro GLIB_CHECK_VERSION. (MAJOR, MINOR, MICRO) = Glib->GET_VERSION_INFO Shorthand to fetch as a list the glib version for which Glib was compiled. See "Glib::MAJOR_VERSION", etc. integer = Glib::MAJOR_VERSION Provides access to the version information that Glib was compiled against. Essentially equivalent to the #define's GLIB_MAJOR_VERSION. integer = Glib::MICRO_VERSION Provides access to the version information that Glib was compiled against. Essentially equivalent to the #define's GLIB_MICRO_VERSION. integer = Glib::MINOR_VERSION Provides access to the version information that Glib was compiled against. Essentially equivalent to the #define's GLIB_MINOR_VERSION. integer = Glib::major_version Provides access to the version information that Glib is linked against. Essentially equivalent to the global variable glib_major_version. integer = Glib::micro_version Provides access to the version information that Glib is linked against. Essentially equivalent to the global variable glib_micro_version. integer = Glib::minor_version Provides access to the version information that Glib is linked against. Essentially equivalent to the global variable glib_minor_version. SEE ALSO
Glib COPYRIGHT
Copyright (C) 2003-2011 by the gtk2-perl team. This software is licensed under the LGPL. See Glib for a full notice. perl v5.14.2 2012-05-24 Glib::version(3pm)
All times are GMT -4. The time now is 12:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy