Sponsored Content
Full Discussion: Selecting groups
Top Forums Shell Programming and Scripting Selecting groups Post 302907489 by anil510 on Saturday 28th of June 2014 03:20:22 PM
Old 06-28-2014
Selecting groups

I have a file with contents like

Code:
host1.domain.com:9090,host2.domain.com:9090,host3.domain.com:9090

I am looking for such an operation so that, the output should be
Code:
host1.domain.com:9090
host2.domain.com:9090
host3.domain.com:9090

And also, if the number of entries are more, the output should be same like above.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Selecting a line value

Hello, I just wanted to know if there is a way in UNIX to select a line value from a list of words. there is no line number before each word, hence could not use grep. (4 Replies)
Discussion started by: unibboy
4 Replies

2. Shell Programming and Scripting

Selecting one file from a list

Hi, I am able to do this by brute force but I am just curious if there is a better way of handling things. Basically the scenario is something like this: There are a number of files in a directory: rib.20071224.1759.gz 24-Dec-2007 17:59 132K rib.20071224.1959.gz 24-Dec-2007... (7 Replies)
Discussion started by: Legend986
7 Replies

3. Shell Programming and Scripting

Selecting a string

Hi, I have a small question... Since i am new to Unix ksh scripting i am having this problem of understanding... Well the thing is that i just want a part of a line for example Data Set=ELIG_Member_20090126.dat Count Total= 8192 Actual Total= 8187 I just want the value of Actual Total... (4 Replies)
Discussion started by: bhagya2340
4 Replies

4. Shell Programming and Scripting

selecting column in perl

Dear all, I have a rather large file of numbers which i would like to read into a script and then do some maths on a specific column( e.g column). so far i have been using the following awk command awk '{print $4}' infile.txt > out.tmp to strip out the desired column within the in perl... (3 Replies)
Discussion started by: Mish_99
3 Replies

5. UNIX for Dummies Questions & Answers

Help selecting some rows with awk

Hi there, I have a text file with several colums separated by "|;#" I need to search the file extracting all columns starting with the value of "1" or "2" saving in a separate file just the first 7 columns of each row maching the criteria, with replacement of the saparators in the nearly created... (2 Replies)
Discussion started by: capnino
2 Replies

6. Shell Programming and Scripting

about selecting lines

Hello , i got text file like that' C:\Users\Public\Pictures\Sample Pictures\aa.jpg C:\Users\Public\Pictures\Sample Pictures\thumb.jpg C:\Users\Public\Pictures\vv\cc.jpg C:\Users\Public\Pictures\Sample Pictures\ee.jpg C:\Users\Public\aa\Sample Pictures\cvswsr.jpg... (1 Reply)
Discussion started by: davidkhan
1 Replies

7. Shell Programming and Scripting

Selecting lines of a file

Say I wanted to select the 5th line of a file without knowing the context of the file. Would I use grep and pipe it into wc or is there a more simple way of doing this? (3 Replies)
Discussion started by: puttster
3 Replies

8. Shell Programming and Scripting

Selecting data between [ and ]

Hi Team, I am searching through log file using grep -i '<search_key>' <file_name>|awk '{print $18}' example outputs are I would like to select the data between and no other as I am getting some junk characters sometimes which chaging the o/p display format. Kindly assist.... (8 Replies)
Discussion started by: sanjaydubey2006
8 Replies

9. Shell Programming and Scripting

selecting certain files

Hi, I have been working on a punch of codes and I got to a problem I hope to get help on. I have some files that I want to work with but the folder has other files in it. For example: The folder contains these files: path to files: /home/distribution/ ls: b.10; b.11; b.12; b.20; b.222;... (2 Replies)
Discussion started by: iconig
2 Replies

10. Shell Programming and Scripting

Selecting tables

Hi, Can anyone help me that, How to see the table fields in Oracle database through shell script(ksh). I have tried with the following: sqlplus -s $user/$passwd@$sid << SQL >> session.log select * from Testtab.sql I'm not able to see anything.. Thanks (4 Replies)
Discussion started by: zxcjggu708
4 Replies
PLACKUP(1p)						User Contributed Perl Documentation					       PLACKUP(1p)

NAME
plackup - Run PSGI application with Plack servers SYNOPSIS
# read your app from app.psgi file plackup # choose .psgi file from ARGV[0] (or with -a option) plackup hello.psgi # switch server implementation with --server (or -s) plackup --server HTTP::Server::Simple --port 9090 --host 127.0.0.1 test.psgi # use UNIX socket to run FCGI daemon plackup -s FCGI --listen /tmp/fcgi.sock myapp.psgi # launch FCGI external server on port 9090 plackup -s FCGI --port 9090 DESCRIPTION
plackup is a command line utility to run PSGI applications from the command line. plackup automatically figures out the environment it is run in, and runs your application in that environment. FastCGI, CGI, AnyEvent and others can all be detected. See Plack::Loader for the authorative list. "plackup" assumes you have an "app.psgi" script in your current directory. The last statement of "app.psgi" should be a code reference that is a PSGI application: #!/usr/bin/perl use MyApp; my $application = MyApp->new; my $app = sub { $application->run_psgi(@_) }; ARGUMENTS
.psgi plackup --host 127.0.0.1 --port 9090 /path/to/app.psgi The first non-option argument is used as a ".psgi" file path. You can also set this path with "-a" or "--app". If omitted, the default file path is "app.psgi" in the current directory. OPTIONS
-a, --app Specifies the full path to a ".psgi" script. You may alternately provide this path as the first argument to "plackup". -e Evaluates the given perl code as a PSGI app, much like perl's "-e" option: plackup -e 'sub { my $env = shift; return [ ... ] }' It is also handy when you want to run a custom application like Plack::App::*. plackup -MPlack::App::File -e 'Plack::App::File->new(...)->to_app' You can also specify "-e" option with ".psgi" file path to wrap the application with middleware configuration from the command line. You can also use Plack::Builder DSL syntax inside "-e" code. For example: plackup -e 'enable "Auth::Basic", authenticator => ...;' myapp.psgi is equivalent to the PSGI application: use Plack::Builder; use Plack::Util; builder { enable "Auth::Basic", authenticator => ...; Plack::Util::load_psgi("myapp.psgi"); }; Note that when you use "-e" option to enable middleware, plackup doesn't assume the implicit "app.psgi" path. You must either pass the path to your ".psgi" file in the command line arguments, or load the application inside "-e" after the "enable". plackup # Runs app.psgi plackup -e 'enable "Foo"' # Doesn't work! plackup -e 'enable "Foo"' app.psgi # Works plackup -e 'enable "Foo"; sub { ... }' # Works -o, --host Binds to a TCP interface. Defauts to undef, which lets most server backends bind the any (*) interface. This option is only valid for servers which support TCP sockets. -p, --port Binds to a TCP port. Defaults to 5000. This option is only valid for servers which support TCP sockets. -s, --server, the "PLACK_SERVER" environment variable Selects a specific server implementation to run on. When provided, the "-s" or "--server" flag will be preferred over the environment variable. If no option is given, plackup will try to detect the best server implementation based on the environment variables as well as modules loaded by your application in %INC. See Plack::Loader for details. -S, --socket Listens on a UNIX domain socket path. Defaults to undef. This option is only valid for servers which support UNIX sockets. -l, --listen Listens on one or more addresses, whether "HOST:PORT", ":PORT", or "PATH" (without colons). You may use this option multiple times to listen on multiple addresses, but the server will decide whether it supports multiple interfaces. -D, --daemonize Makes the process run in the background. It's up to the backend server/handler implementation whether this option is respected or not. -I Specifies Perl library include paths, like "perl"'s -I option. You may add multiple paths by using this option multiple times. -M Loads the named modules before loading the app's code. You may load multiple modules by using this option multiple times. -E, --env, the "PLACK_ENV" environment variable. Specifies the environment option. Setting this value with "-E" or "--env" also writes to the "PLACK_ENV" environment variable. This allows applications or frameworks to tell which environment setting the application is running on. # These two are the same plackup -E deployment env PLACK_ENV=deployment plackup Common values are "development", "deployment", and "test". The default value is "development", which causes "plackup" to load the middleware components: AccessLog, StackTrace and Lint. -r, --reload Makes plackup restart the server whenever a file in your development directory changes. This option by default watches the "lib" directory and the base directory where .psgi file is located. Use "-R" to watch other directories. Reloading will delay the compilation of your application. Automatic server detection (see "-s" above) may not behave as you expect, if plackup needs to scan your application for the modules it uses. Avoid problems by specifying "-s" explicitly when using "-r" or "-R". -R, --Reload Makes plackup restart the server whenever a file in any of the given directories changes. "-R" and "--Reload" take a comma-separated list of paths: plackup -R /path/to/project/lib,/path/to/project/templates -L, --loader Specifies the server loading subclass that implements how to run the server. Available options are Plack::Loader (default), Restarter (automatically set when "-r" or "-R" is used), Delayed and Shotgun. See Plack::Loader::Delayed and Plack::Loader::Shotgun for more details. --access-log Specifies the pathname of a file where the access log should be written. By default, in the development environment access logs will go to STDERR. Other options that starts with "--" are passed through to the backend server. See each Plack::Handler backend's documentation for more details on their available options. SEE ALSO
Plack::Runner Plack::Loader perl v5.14.2 2011-07-14 PLACKUP(1p)
All times are GMT -4. The time now is 07:11 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy