Sponsored Content
Top Forums Shell Programming and Scripting How to keep appending a newly created file based on some keywords Post 302321727 by supreet on Tuesday 2nd of June 2009 02:34:20 AM
Old 06-02-2009
Hi devtakh, Thanks a lot your code worked just fine.Smilie
Tony I am not sure why but when I run your code the file got created but when I clicked on it to open I got an error saying that "the file can not be created". Still thanks for your help. I lerned some concepts from your peace of code, which I can use elsewhere.

-----Post Update-----

I am sorry guys but even dev's code worked only for the first time. I deleted the generated log file and tried creating it again but this time I am getting the same error as "Can not create /temp/testlogfile_error_020609.txt"
Atteched is the screenshot for referance.

-----Post Update-----

I am sorry guys but even dev's code worked only for the first time. I deleted the generated log file and tried creating it again but this time I am getting the same error as "Can not create /temp/testlogfile_error_020609.txt"
Atteched is the screenshot for referance.

-----Post Update-----

Here is the attachement.
How to keep appending a newly created file based on some keywords-errorgif
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to FTP all newly created but the current open file?

An application running on HP-UX constantly generates new text log files ( I think using logpipe ). Any new file created requires to be ftp'ed to an offline server, however I want to make sure that the current file being written should not be transferred. For examples consider the following files... (3 Replies)
Discussion started by: indianya
3 Replies

2. Shell Programming and Scripting

How to find the newly created directory

Hi, I need to create new directory by increasing the number by 1 of extracted lastly created directory. e.g. Log\out_log_1\ Log\out_log_2\ Log\out_log_3\ become Log\out_log_1\ Log\out_log_2\ Log\out_log_3\ Log\out_log_4\ Can anyone help how to do it in c-shell... (3 Replies)
Discussion started by: Andre_2008
3 Replies

3. Shell Programming and Scripting

sftp - get newly created files on incremental basis

Hi, We have a sftp server which creates files daily and keeps 6 months of files on the server. We are creating a daily job to get the files and load into database. My problem is "how to get ONLY those files which got created after my last get". Let me provide some more details to it. Below... (15 Replies)
Discussion started by: ravi.videla
15 Replies

4. UNIX for Advanced & Expert Users

default size of a newly created folder

Hi all, In linux how to create a directory with specified size, so that it can be used only up to the mentioned size. Actually my question is, whether we can do directory quota in linux. mounting the directory in a partiton will do that, but do we have any other option... (1 Reply)
Discussion started by: anishkumarv
1 Replies

5. Shell Programming and Scripting

copy range of lines in a file based on keywords from another file

Hi Guys, I have the following problem. I have original file (org.txt) that looks like this module v_1(.....) //arbitrary number of text lines endmodule module v_2(....) //arbitrary number of text lines endmodule module v_3(...) //arbitrary number of text lines endmodule module... (6 Replies)
Discussion started by: kaaliakahn
6 Replies

6. Solaris

Can't see Newly created LUN by SAN admin

hello, i am an oracle DBA and trying to scan a newly created LUN of 200 GB on fiber channel by SAN admin.we have solaris 10 and SANtoolkit is installed.i tried following to get the new LUN at my machine. go /opt/Netapp/Santoolkit/bin and then ./sanlun lun show but i see only the existing... (12 Replies)
Discussion started by: janakors
12 Replies

7. Shell Programming and Scripting

Copy an array to a newly created directory

hello everyone, I am new to perl script and trying to develop a script as follows. I am trying to Create an array for storing all file names. I am trying to copy $libs into "scratch". however i am unable to do so. Please suggest.. #!/usr/bin/perl use File::Copy; #use... (5 Replies)
Discussion started by: Rashid Khan
5 Replies

8. Hardware

Formatting a newly created lun

Hi , I have created one new lun in my SAN storage and make it visible to my HP servers , but the fdisk -l output is somehow confusing. Do not know what to do next ---------- fdisk -l /dev/sdo1 Disk /dev/sdo1 (Sun disk label): 64 heads, 32 sectors, 10238 cylinders Units =... (7 Replies)
Discussion started by: mishra.sankar
7 Replies

9. AIX

No iscsi available in newly created AIX wpar

AIX 7.1 New to WPAR, hopefully just missing something simple here. Creating the WPAR like this..... (The box where the WPAR is hosted does have an iscsi protocol device) mkwpar -h wpar08 -l -n wpar08 -N interface=en0 address=xxx.xx.xx.xxx netmask=255.255.255.0 -D devname=/dev/iscsi0 -D... (0 Replies)
Discussion started by: TomR
0 Replies

10. UNIX for Beginners Questions & Answers

Tar file with newly created file

Hello guys thanks for this helpful forum. I'm new to scripting and doing a little script that dump a sql database with some extra files from a VM of the company I'm in, and create a tar archive to be saved on our serve. How can I have the tarball to be created with the files generated in the... (2 Replies)
Discussion started by: dquake
2 Replies
ODFFILESEARCH(1p)					User Contributed Perl Documentation					 ODFFILESEARCH(1p)

NAME
odffilesearch - File selection by keywords SYNOPSIS
odffilesearch -R "D:Documents*.odt" openoffice desktop XML produces the list of the ODF Text documents present in the given directory and its subdirectories, and containing the words "openoffice", "desktop" AND "XML" odffilesearch -command "rm -f %f" "*.ods *.odt" lost dismiss cancel executes the "rm -f filename" (i.e. deletes the file in a Unix system) for each ODT or ODS file present in the current directory and containing the words "lost", "dismiss" AND "cancel" USAGE
odffilesearch [-options] <file filter> <keyword list> DESCRIPTION
This utility allows the user to retrieve a list of files matching a given set of keywords or regular expressions. A file is selected when it contains, in its text and/or in its metadata (title, subject, keywords or description), all the given search strings. The selected files are echoed to the standard output (one file per line), so this utility can be used as a filter piping its results to another program. Alternatively, a given shell command can be launched by the script each time a file matches, allowing on-the-fly processing of the selected documents. The files filter may content one or more space-separated paths. Each path may content jokers. So it's possible to explore several directories and/or several filename patterns. All the arguments after the file filter are processed as search criteria. OPTIONS
-R -recursive include the subdirectories of each given search directory -verbose -trace -debug echo some processing comments -warnings activate the warning messages of the OpenOffice::OODoc API -log <file> like -verbose, but then messages are sent to the given file and don't pollute the standard output -result <file> -output <file> send the list of matching files to the given file and not to the standard output -criteria <file> get search criteria from a file (one per line); the loaded search keywords may be combined with additional criteria passed with the command line, if any. -command <command> -exec <command> execute a shell command for each matching file ; if the command string contains "%f", this substring is replaced with the name of the selected file ; if this option is provided, the selection list is not echoed to the standard output ; if -verbose is on, the value returned by the command is echoed -encoding <encoding> selects the user's character set ; this option is mandatory if one or more search criteria contain characters not belonging to the default character set perl v5.14.2 2008-05-04 ODFFILESEARCH(1p)
All times are GMT -4. The time now is 01:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy