Sponsored Content
Top Forums Shell Programming and Scripting Replacing Awk with One-liner Perl Post 302584470 by balajesuri on Friday 23rd of December 2011 10:08:35 AM
Old 12-23-2011
Ok.. What happened? Isn't the perl one-liner working?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl One Liner

Hi , Can anybody explain how this perl one liner works.. It is to test whether the number is prime or not perl -le 'print "PRIME" if (1 x shift) !~ /^(11+)\1+$/' 19 Thanks in advance Shihab (2 Replies)
Discussion started by: shihabvk
2 Replies

2. Shell Programming and Scripting

awk/perl one-liner assist

In a ~4GB file there are lines like, 13.13.4.3 Googe.com - Jan/23/2011:00:00:00 +0000 "URL Google HTTP/1.1" 45 56 208 - "http://www.gogle.com/webhp?hl=en&tab=nw#hl=en&source=hp&biw=1366&bih=667&q=hello&aq=f&aqi=&aql=&oq=&fp=c432485467934a89" ".Net; Fox" - 13.145.3.3 Goge.com -... (3 Replies)
Discussion started by: gameboy87
3 Replies

3. Shell Programming and Scripting

Search & Replace regex Perl one liner to AWK one liner

Thanks for giving your time and effort to answer questions and helping newbies like me understand awk. I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk. Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies

4. Shell Programming and Scripting

Need an awk / sed / or perl one-liner to remove last 4 characters with non-unique pattern.

Hi, I'm writing a ksh script and trying to use an awk / sed / or perl one-liner to remove the last 4 characters of a line in a file if it begins with a period. Here is the contents of the file... the column in which I want to remove the last 4 characters is the last column. ($6 in awk). I've... (10 Replies)
Discussion started by: right_coaster
10 Replies

5. Shell Programming and Scripting

replace awk with a perl one liner (REGEXP and FS)

hello, I want to replace awk with a perl one liner in unix. i use in awk REGEX and FS ( field separator) because awk syntaxes in different unix os versions have not the same behaviour. Awk, Nawk and GNU Awk Cheat Sheet - good coders code, great reuse i have a file named "file" and want... (5 Replies)
Discussion started by: bora99
5 Replies

6. Shell Programming and Scripting

HELP with AWK one-liner. Need to employ an If condition inside AWK to check for array variable ?

Hello experts, I'm stuck with this script for three days now. Here's what i need. I need to split a large delimited (,) file into 2 files based on the value present in the last field. Samp: Something.csv bca,adc,asdf,123,12C bca,adc,asdf,123,13C def,adc,asdf,123,12A I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies

7. Shell Programming and Scripting

Replacing lines matching a multi-line pattern (sed/perl/awk)

Dear Unix Forums, I am hoping you can help me with a pattern matching problem. What am I trying to do? I want to replace multiple lines of a text file (that match a multi-line pattern) with a single line of text. These patterns can span several lines and do not always have the same number of... (10 Replies)
Discussion started by: thefang
10 Replies

8. Shell Programming and Scripting

PERL one liner

hi, I am using PERL one liner for oracle database connection as : $PERL -e "use DBI; DBI->connect(qw(DBI:Oracle:SID user passwd));" is there a way to append select statement to this connection ? i.e. DB connection and select stmt in one line ? how to do sysdba connection using one lines... (1 Reply)
Discussion started by: talashil
1 Replies

9. Shell Programming and Scripting

Checking and replacing first line in text file, one-liner?

Hello, I'm looking to check only the first line of a file to see if it is a format string, like # -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -\*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2if the first line is anything else, insert the above string. I'd... (3 Replies)
Discussion started by: f77hack
3 Replies

10. UNIX for Beginners Questions & Answers

Perl one liner in bash script not replacing hours and minutes [HH:MM]

Hi I want to replace time stamp in the following line PROCNAME.Merge.exchMon.CODE.T_QSTART 08:45 read assuming the new time stamp is 09:45 ; the line is getting replaced as below :45 read I'm trying to use the perl one liner in bash script perl -pi... (4 Replies)
Discussion started by: charlie87
4 Replies
DR::Tarantool::CoroClient(3pm)				User Contributed Perl Documentation			    DR::Tarantool::CoroClient(3pm)

NAME
DR::Tarantool::CoroClient - async coro driver for tarantool <http://tarantool.org> SYNOPSIS
use DR::Tarantool::CoroClient; use Coro; my $client = DR::Tarantool::CoroClient->connect( port => $port, spaces => $spaces; ); my @res; for (1 .. 100) { async { push @res => $client->select(space_name => $_); } } cede while @res < 100; METHODS
connect Connects to tarantool. Arguments The same as "connect" in DR::Tarantool::AsyncClient exclude callback. Returns a connector or croaks error. ping The same as "ping" in DR::Tarantool::AsyncClient exclude callback. Returns TRUE or FALSE if an error. insert The same as "insert" in DR::Tarantool::AsyncClient exclude callback. Returns tuples that were extracted from database or undef. Croaks error if an error was happened. select The same as "select" in DR::Tarantool::AsyncClient exclude callback. Returns tuples that were extracted from database or undef. Croaks error if an error was happened. update The same as "update" in DR::Tarantool::AsyncClient exclude callback. Returns tuples that were extracted from database or undef. Croaks error if an error was happened. delete The same as "delete" in DR::Tarantool::AsyncClient exclude callback. Returns tuples that were extracted from database or undef. Croaks error if an error was happened. call_lua The same as "call_lua" in DR::Tarantool::AsyncClient exclude callback. Returns tuples that were extracted from database or undef. Croaks error if an error was happened. perl v5.14.2 2012-06-04 DR::Tarantool::CoroClient(3pm)
All times are GMT -4. The time now is 05:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy