Sponsored Content
Top Forums Shell Programming and Scripting reading information from a table and apply a command on multiple files Post 302708837 by RudiC on Tuesday 2nd of October 2012 09:57:43 AM
Old 10-02-2012
Try this:
Code:
while read BAM REGION; do samtools view $BAM chrname:$REGION >> $REGION.txt; done <file

remove the region*.txt files before use.
This User Gave Thanks to RudiC For This Post:
 

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

NAME
Jifty::Web - Web framework for a Jifty application METHODS
new Creates a new "Jifty::Web" object mason Returns a HTML::Mason::Request object out Send a string to the browser. url Returns the root url of this Jifty application. This is pulled from the configuration file. Takes an optional named path which will form the path part of the resulting URL. serial Returns a unique identifier, guaranteed to be unique within the runtime of a particular process (i.e., within the lifetime of Jifty.pm). There's no sort of global uniqueness guarantee, but it should be good enough for generating things like moniker names. SESSION MANAGEMENT setup_session Sets up the current "session" object (a Jifty::Web::Session tied hash). Aborts if the session is already loaded. session Returns the current session's hash. In a regular user environment, it persists, but a request can stop that by handing it a regular hash to use. CURRENT USER current_user [USER] Getter/setter for the current user; this gets or sets the 'user' key in the session. These are Jifty::Record objects. If a temporary_current_user has been set, will return that instead. If the current application has no loaded current user, we get an empty app-specific "CurrentUser" object. (This "ApplicationClass"::CurrentUser class, a subclass of Jifty::CurrentUser, is autogenerated if it doesn't exist). temporary_current_user [USER] Sets the current request's current_user to USER if set. This value will _not_ be persisted to the session at the end of the request. To restore the original value, set temporary_current_user to undef. REQUEST handle_request [REQUEST] This method sets up a current session, and then processes the given Jifty::Request object. If no request object is given, processes the request object in "request". Each action on the request is vetted in three ways -- first, it must be marked as "active" by the Jifty::Request (this is the default). Second, it must be in the set of allowed classes of actions (see "is_allowed" in Jifty::API). Finally, the action must validate. If it passes all of these criteria, the action is fit to be run. Before they are run, however, the request has a chance to be interrupted and saved away into a continuation, to be resumed at some later point. This is handled by "save_continuation" in Jifty::Request. If the continuation isn't being saved, then "handle_request" goes on to run all of the actions. If all of the actions are successful, it looks to see if the request wished to call any continuations, possibly jumping back and re-running a request that was interrupted in the past. This is handled by "call_continuation" in Jifty::Request. For more details about continuations, see Jifty::Continuation. request [VALUE] Gets or sets the current Jifty::Request object. response [VALUE] Gets or sets the current Jifty::Response object. form Returns the current Jifty::Web::Form object, creating one if there isn't one already. new_action class => CLASS, moniker => MONIKER, order => ORDER, arguments => PARAMHASH Creates a new action (an instance of a subclass of Jifty::Action). The named arguments passed to this method are passed on to the "new" method of the action named in "CLASS". If you pass an odd number of arguments, then the first argument is interpreted as "class". Arguments class "CLASS" is qualified, and an instance of that class is created, passing the "Jifty::Web" object, the "MONIKER", and any other arguments that "new_action" was supplied. moniker "MONIKER" is a unique designator of an action on a page. The moniker is content-free and non-fattening, and may be auto-generated. It is used to tie together arguments that relate to the same action. order "ORDER" defines the order in which the action is run, with lower numerical values running first. arguments "ARGUMENTS" are passed to the "new" in Jifty::Action method. In addition, if the current request ("$self->request") contains an action with a matching moniker, any arguments that are in that requested action but not in the "PARAMHASH" list are set. This implements "sticky fields". As a contrast to "add_action" in Jifty::Web::Form, this does not add the action to the current form -- instead, the first form field to be rendered will automatically register the action in the current form field at that time. new_action_from_request REQUESTACTION Given a Jifty::Request::Action, creates a new action using "new_action". failed_actions Returns an array of Jifty::Action objects, one for each Jifty::Request::Action that is marked as failed in the current response. succeeded_actions As "failed_actions", but for actions that completed successfully; less often used. REDIRECTS AND CONTINUATIONS next_page [VALUE] Gets or sets the next page for the framework to show. This is normally set during the "take_action" method or a Jifty::Action force_redirect [VALUE] Gets or sets whether we should force a redirect to "next_page", even if it's already the current page. You might set this, e.g. to force a redirect after a POSTed action. redirect_required Returns true if we need to redirect, now that we've processed all the actions. We need a redirect if either "next_page" is different from the current page, or "force_redirect" has been set. webservices_redirect [TO] Handle redirection inside webservices call. This is meant to be hooked by plugin that knows what to do with it. redirect [TO] Redirect to the next page. If you pass this method a parameter, it redirects to that URL rather than next_page. It creates a continuation of where you want to be, and then calls it. If you want to redirect to a page with parameters, pass in a Jifty::Web::Form::Clickable object. caller Returns the Jifty::Request of our enclosing continuation, or an empty Jifty::Request if we are not in a continuation. HTML GENERATION tangent PARAMHASH If called in non-void context, creates and renders a Jifty::Web::Form::Clickable with the given PARAMHASH, forcing a continuation save. In void context, does a redirect to the URL that the Jifty::Web::Form::Clickable object generates. Both of these versions preserve all state variables by default. goto PARAMHASH Does an instant redirect to the url generated by the Jifty::Web::Form::Clickable object generated by the PARAMHASH. link PARAMHASH Generates and renders a Jifty::Web::Form::Clickable using the given PARAMHASH. return PARAMHASH If called in non-void context, creates and renders a Jifty::Web::Form::Clickable using the given PARAMHASH, additionally defaults to calling the current continuation. Takes an additional argument, "to", which can specify a default path to return to if there is no current continuation. In void context, does a redirect to the URL that the Jifty::Web::Form::Clickable object generates. template_exists PATH Returns true if PATH is a valid template inside your template root. This checks for both Template::Declare and HTML::Mason Templates. Specifically, returns a reference to the handler which can process the template. If PATH is a reference to the path, it will update the path to append "/index.html" if the path in question doesn't exist, but the index does. render_template PATH Use our templating system to render a template. Searches through "view_handlers" in Jifty::Handler to find the first handler which provides the given template, and caches the handler for future requests. Catches errors, and redirects to "/errors/500"; also shows "/errors/404" if the template cannot be found. render_messages [MONIKER] Outputs any messages that have been added, in <div id="messages"> and <div id="errors"> tags. Messages are added by calling "message" in Jifty::Result. If a moniker is specified, only messages for that moniker are rendered. render_success_messages [MONIKER] Render success messages for the given moniker, or all of them if no moniker is given. render_error_messages [MONIKER] Render error messages for the given moniker, or all of them if no moniker is given. _render_messages TYPE [MONIKER] Output any messages of the given TYPE (either 'error' or 'message') in a <div id="TYPEs"> tag. If a moniker is given, only renders messages for that action. Internal helper for "render_success_messages" and "render_errors". query_string KEY => VALUE [, KEY => VALUE [, ...]] Returns an URL-encoded query string piece representing the arguments passed to it. escape STRING HTML-escapes the given string and returns it escape_uri STRING URI-escapes the given string and returns it navigation Returns the Jifty::Web::Menu for this web request; one is automatically created if it hasn't been already. page_navigation Returns the Jifty::Web::Menu for this web request; one is automatically created if it hasn't been already. This is useful for separating page-level navigation from app-level navigation. include_css Returns a "<link>" tag for the compressed CSS add_css FILE1, FILE2, ... Pushes files onto "Jifty->web->css_files" include_javascript Returns a "<script>" tag for the compressed Javascript. Your application specific javascript goes in share/web/static/js/app.js. This will be automagically included if it exists. If you want to add javascript behaviour to your page using CSS selectors then put your behaviour rules in share/web/static/js/app_behaviour.js which will also be automagically included if it exists. The "behaviour.js" library is included by Jifty. For more information on "behaviour.js" see <http://bennolan.com/behaviour/>. However if you want to include other javascript libraries you need to add them to the javascript_libs array of your application. Do this in the "start" sub of your main application class. For example if your application is Foo then in "Foo.pm" in lib sub start { Jifty->web->add_javascript(qw( jslib1.js jslib2.js ) ); } The add_javascript method will append the files to javascript_libs. If you need a different order, you'll have to massage javascript_libs directly. Jifty will look for javascript libraries under share/web/static/js/ by default as well as any plugin static roots. add_javascript FILE1, FILE2, ... Pushes files onto "Jifty->web->javascript_libs" remove_javascript FILE1, FILE2, ... Removes the given files from "Jifty->web->javascript_libs". This is intended for plugins or applications that provide another version of the functionality given in our default JS libraries. For example, the CSSQuery plugin will get rid of the cssQuery-jQuery.js back-compat script. add_external_javascript URL1, URL2, ... Pushes URLs onto "Jifty->web->external_javascript_libs" STATE VARIABLES get_variable NAME Gets a page specific variable from the request object. set_variable NAME VALUE Takes a key-value pair for variables to serialize and hand off to the next page. Behind the scenes, these variables get serialized into every link or form that is marked as 'state preserving'. See Jifty::Web::Form::Clickable. Passing "undef" as a value will remove the variable state_variables Returns all of the state variables that have been set for the next request, as a hash; N.B. These are not prefixed with "J:V-", as they were in earlier versions of Jifty clear_state_variables Remove all the state variables to be serialized for the next request. REGIONS get_region [QUALIFIED NAME] Given a fully "QUALIFIED NAME" of a region, returns the Jifty::Web::PageRegion with that name, or undef if no such region exists. region PARAMHASH The provided PARAMHASH is used to create and render a Jifty::Web::PageRegion; the "PARAMHASH" is passed directly to its "new" in Jifty::Web::PageRegion method, and then "render" in Jifty::Web::PageRegion is called. replace_current_region PATH Replaces the current region with a new region and renders it Returns undef if there's no current region current_region Returns the current Jifty::Web::PageRegion, or undef if there is none. qualified_region [REGION] Returns the fully qualified name of the current Jifty::Web::PageRegion, or the empty string if there is none. If "REGION" is supplied, gives the qualified name of "REGION" were it placed in the current region. You may also use a literal region name. qualified_parent_region [REGION] Returns the fully qualified name of the current Jifty::Web::PageRegion's parent, or the empty string if there is none. If "REGION" is supplied, gives the qualified name of "REGION" were it placed in the parent region. You may also use a literal region name. is_ssl Indicates whether the current request was made using SSL. perl v5.14.2 2011-04-25 Jifty::Web(3pm)
All times are GMT -4. The time now is 04:40 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy