Sponsored Content
Top Forums Shell Programming and Scripting Problem in redirecting ftp msgs to a log file Post 302318405 by jim mcnamara on Thursday 21st of May 2009 12:47:13 PM
Old 05-21-2009
Search the forums for a 'here document' -
<< MARKER


MARKER

Any string you want (not a command) can be a delimiter for a here document.

Redirection for here document:
some command << EOF > outputofcomanndgoesinthisfile.log

EOF
 

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
Xapian::WritableDatabase(3pm)				User Contributed Perl Documentation			     Xapian::WritableDatabase(3pm)

NAME
Search::Xapian::WritableDatabase - writable database object DESCRIPTION
This class represents a Xapian database for indexing. It's a subclass of Search::Xapian::Database, which is used for searching. METHODS
new <database> or new <path> <mode> Class constructor. Takes either a database object, or a path and one of DB_OPEN, DB_CREATE, DB_CREATE_OR_OPEN or DB_CREATE_OR_OVERWRITE. These are exported by Search::Xapian with the 'db' option. clone Return a clone of this class. flush Flush to disk any modifications made to the database. For efficiency reasons, when performing multiple updates to a database it is best (indeed, almost essential) to make as many modifications as memory will permit in a single pass through the database. To ensure this, Xapian batches up modifications. Flush may be called at any time to ensure that the modifications which have been made are written to disk: if the flush succeeds, all the preceding modifications will have been written to disk. If any of the modifications fail, an exception will be thrown and the database will be left in a state in which each separate addition, replacement or deletion operation has either been fully performed or not performed at all: it is then up to the application to work out which operations need to be repeated. Beware of calling flush too frequently: this will have a severe performance cost. Note that flush need not be called explicitly: it will be called automatically when the database is closed, or when a sufficient number of modifications have been made. add_document <document> Add a new document to the database. This method adds the specified document to the database, returning a newly allocated document ID. Note that this does not mean the document will immediately appear in the database; see flush() for more details. As with all database modification operations, the effect is atomic: the document will either be fully added, or the document fails to be added and an exception is thrown (possibly at a later time when flush is called or the database is closed). delete_document <doc_id> Delete a document from the database. This method removes the document with the specified document ID from the database. Note that this does not mean the document will immediately disappear from the database; see flush() for more details. As with all database modification operations, the effect is atomic: the document will either be fully removed, or the document fails to be removed and an exception is thrown (possibly at a later time when flush is called or the database is closed). delete_document_by_term <term> Delete any documents indexed by a term from the database. This method removes any documents indexed by the specified term from the database. The intended use is to allow UIDs from another system to easily be mapped to terms in Xapian, although this method probably has other uses. replace_document <doc_id> <document> eplace a given document in the database. This method replaces the document with the specified document ID. Note that this does not mean the document will immediately change in the database; see flush() for more details. As with all database modification operations, the effect is atomic: the document will either be fully replaced, or the document fails to be replaced and an exception is thrown (possibly at a later time when flush is called or the database is closed). replace_document_by_term <unique_term> <document> Replace any documents matching an unique term. This method replaces any documents indexed by the specified term with the specified document. If any documents are indexed by the term, the lowest document ID will be used for the document, otherwise a new document ID will be generated as for add_document. The intended use is to allow UIDs from another system to easily be mapped to terms in Xapian, although this method probably has other uses. Note that this does not mean the document(s) will immediately change in the database; see flush() for more details. As with all database modification operations, the effect is atomic: the document(s) will either be fully replaced, or the document(s) fail to be replaced and an exception is thrown (possibly at a later time when flush is called or the database is closed). add_spelling <word> <freqinc> Add a word to the spelling dictionary. If the word is already present, its frequency is increased. Parameters: word The word to add. freqinc How much to increase its frequency by (default 1). remove_spelling <word> <freqdec> Remove a word from the spelling dictionary. The word's frequency is decreased, and if would become zero or less then the word is removed completely. Parameters: word The word to remove. freqdec How much to decrease its frequency by (default 1). reopen Re-open the database to ensure you are using the latest revision. close Close the database. This also implies a commit() unless a transaction is in progress. SEE ALSO
Search::Xapian,Search::Xapian::Enquire,Search::Xapian::Database perl v5.14.2 2012-05-09 Xapian::WritableDatabase(3pm)
All times are GMT -4. The time now is 01:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy