Sponsored Content
Top Forums Shell Programming and Scripting reading information from a table and apply a command on multiple files Post 302708879 by vidyadhar85 on Tuesday 2nd of October 2012 10:48:18 AM
Old 10-02-2012
to make it easy and quick loop through while or for loop in that directory and mv the files with the below command...

Code:
 
echo "gi|16799079|ref|NC_003212.1|:2769071-2769101.txt"|sed -e 's/[:|]/_/g'


Last edited by vidyadhar85; 10-02-2012 at 11:56 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Apply `chmod` for multiple files through FTP

Hi all, Can you please help me in this aspect. I devoloped a FTP script to copy a directory to remote server. Now i got stuck-up in changing the file permissions for all the files in directory. I tried to change the permissions of single file and I did it but failed in changing... (3 Replies)
Discussion started by: Chanakya.m
3 Replies

2. Shell Programming and Scripting

How to Pull out multiple files from DB table and redirect all those files to a differetn directory?

Hi everyone!! I have a database table, which has file_name as one of its fields. Example: File_ID File_Name Directory Size 0001 UNO_1232 /apps/opt 234 0002 UNO_1234 /apps/opt 788 0003 UNO_1235 /apps/opt 897 0004 UNO_1236 /apps/opt 568 I have to... (3 Replies)
Discussion started by: ss3944
3 Replies

3. Shell Programming and Scripting

Apply 'awk' to all files in a directory or individual files from a command line

Hi All, I am using the awk command to replace ',' by '\t' (tabs) in a csv file. I would like to apply this to all .csv files in a directory and create .txt files with the tabs. How would I do this in a script? I have the following script called "csvtabs": awk 'BEGIN { FS... (4 Replies)
Discussion started by: ScKaSx
4 Replies

4. Shell Programming and Scripting

apply record separator to multiple files within a directory using awk

Hi, I have a bunch of records within a directory where each one has this form: (example file1) 1 2 50 90 80 90 43512 98 0909 79869 -9 7878 33222 8787 9090 89898 7878 8989 7878 6767 89 89 78676 9898 000 7878 5656 5454 5454 and i want for all of these files to be... (3 Replies)
Discussion started by: amarn
3 Replies

5. Shell Programming and Scripting

extracting information from multiple files

Hello there, I am trying to extract (string) information ( a list words) from 4 files and then put the results into 1 file. Currently I am doing this using grep -f list.txt file1 . and repeat the process for the other 3 files. The reasons i am doing that (a) I do know how to code (b) each file... (4 Replies)
Discussion started by: houkto
4 Replies

6. UNIX for Dummies Questions & Answers

Reading Table name from a list of files in a Directory

Hi , I have searched through the forum but not able to find out any help :( i have a directory having lot of files which contains sql statemtns eg : file 1 contains select from table_name1 where ..................... select from table_name2 where .......... select from ... (3 Replies)
Discussion started by: Trendz
3 Replies

7. Shell Programming and Scripting

search information in multiple files and save in new files

hi everyone, im stuck in here with shell :) can you help me?? i have a directory with alot files (genbank files ... all ended in .gbk ) more than 1000 for sure ... and i want to read each one of them and search for some information and if i found the right one i save in new file with new... (6 Replies)
Discussion started by: andreia
6 Replies

8. UNIX for Dummies Questions & Answers

Load multiple files into a table

Hi, I need to load data from two files to a single table. My requirement is that I get two files in which a few column data are manadatory. These files are identified based on the file name. For example, I have two files ABCFile and BCDFile. ABCFile has mandatory data in column 3 and 4... (0 Replies)
Discussion started by: reshma15193
0 Replies

9. Shell Programming and Scripting

Apply command to all files in folder

Hi all! I have this command grep -E '^\To: |^\Date: |^\Subject: ' fileA.txt > fileA_1.txt && grep -v '^\To: |^\Date: |^\Subject: ' fileA.txt >> fileA_1.txt && rm fileA.txt && sed -i -e 's/\(Date: \|Subject: \|To: \)//g' fileA_1.txtHow do I apply it to all the files in the folder (each file has a... (7 Replies)
Discussion started by: guilliber
7 Replies

10. UNIX for Beginners Questions & Answers

How to apply the update statement in multiple servers on multiple dbs at a time .?

Hi , Can any please help the below requirement on all multiple servers and multiple dbs. update configuration set value='yes' ;1) the above statement apply on 31 Databases at a time on different Ip address eg : 10.104.1.12 (unix ip address ) the above ip box contains 4 db's eg : db... (2 Replies)
Discussion started by: venkat918
2 Replies
IO::Async::Handle(3pm)					User Contributed Perl Documentation				    IO::Async::Handle(3pm)

NAME
"IO::Async::Handle" - event callbacks for a non-blocking file descriptor SYNOPSIS
This class is likely not to be used directly, because subclasses of it exist to handle more specific cases. Here is an example of how it would be used to watch a listening socket for new connections. In real code, it is likely that the "Loop->listen" method would be used instead. use IO::Socket::INET; use IO::Async::Handle; use IO::Async::Loop; my $loop = IO::Async::Loop->new; my $socket = IO::Socket::INET->new( LocalPort => 1234, Listen => 1 ); my $handle = IO::Async::Handle->new( handle => $socket, on_read_ready => sub { my $new_client = $socket->accept; ... }, ); $loop->add( $handle ); For most other uses with sockets, pipes or other filehandles that carry a byte stream, the IO::Async::Stream class is likely to be more suitable. For non-stream sockets, see IO::Async::Socket. DESCRIPTION
This subclass of IO::Async::Notifier allows non-blocking IO on filehandles. It provides event handlers for when the filehandle is read- or write-ready. EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters: on_read_ready Invoked when the read handle becomes ready for reading. on_write_ready Invoked when the write handle becomes ready for writing. on_closed Optional. Invoked when the handle becomes closed. This handler is invoked before the filehandles are closed and the Handle removed from its containing Loop. The "loop" will still return the containing Loop object. PARAMETERS
The following named parameters may be passed to "new" or "configure": read_handle => IO write_handle => IO The reading and writing IO handles. Each must implement the "fileno" method. Primarily used for passing "STDIN" / "STDOUT"; see the SYNOPSIS section of "IO::Async::Stream" for an example. handle => IO The IO handle for both reading and writing; instead of passing each separately as above. Must implement "fileno" method in way that "IO::Handle" does. on_read_ready => CODE on_write_ready => CODE on_closed => CODE CODE references for event handlers. want_readready => BOOL want_writeready => BOOL If present, enable or disable read- or write-ready notification as per the "want_readready" and "want_writeready" methods. It is required that a matching "on_read_ready" or "on_write_ready" are available for any handle that is provided; either passed as a callback CODE reference or as an overridden the method. I.e. if only a "read_handle" is given, then "on_write_ready" can be absent. If "handle" is used as a shortcut, then both read and write-ready callbacks or methods are required. If no IO handles are provided at construction time, the object is still created but will not yet be fully-functional as a Handle. IO handles can be assigned later using the "set_handle" or "set_handles" methods, or by "configure". This may be useful when constructing an object to represent a network connection, before the connect(2) has actually been performed yet. METHODS
$handle->set_handles( %params ) Sets new reading or writing filehandles. Equivalent to calling the "configure" method with the same parameters. $handle->set_handle( $fh ) Shortcut for $handle->configure( handle => $fh ) $handle->close This method calls "close" on the underlying IO handles. This method will then remove the handle from its containing loop. $handle->close_read $handle->close_write Closes the underlying read or write handle, and deconfigures it from the object. Neither of these methods will invoke the "on_closed" event, nor remove the object from the Loop if there is still one open handle in the object. Only when both handles are closed, will "on_closed" be fired, and the object removed. $handle = $handle->read_handle $handle = $handle->write_handle These accessors return the underlying IO handles. $fileno = $handle->read_fileno $fileno = $handle->write_fileno These accessors return the file descriptor numbers of the underlying IO handles. $value = $handle->want_readready $oldvalue = $handle->want_readready( $newvalue ) $value = $handle->want_writeready $oldvalue = $handle->want_writeready( $newvalue ) These are the accessor for the "want_readready" and "want_writeready" properties, which define whether the object is interested in knowing about read- or write-readiness on the underlying file handle. SEE ALSO
o IO::Handle - Supply object methods for I/O handles AUTHOR
Paul Evans <leonerd@leonerd.org.uk> perl v5.14.2 2012-10-24 IO::Async::Handle(3pm)
All times are GMT -4. The time now is 11:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy