Sponsored Content
Top Forums Shell Programming and Scripting Passing "|" in split function Post 302485343 by jisha on Wednesday 5th of January 2011 01:28:17 AM
Old 01-05-2011
Perfect Smilie

Thank you so much ... quotemeta is new to me.
 

9 More Discussions You Might Find Interesting

1. Programming

How to convert the "select" function into a "poll" function

i have a program using the select function but i want to convert it to poll... how can i do this? thanks in advance... :) (1 Reply)
Discussion started by: rbolante
1 Replies

2. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

3. HP-UX

ERROR: more than one instance of overloaded function "vprintf" has "C" linkage

Hi people! I've got this own library: -------------------------------------------- Personal.h -------------------------------------------- #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include <stdarg.h> #include <string.h> ... (0 Replies)
Discussion started by: donatoll
0 Replies

4. Shell Programming and Scripting

cat $como_file | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g'

hi All, cat file_name | awk /^~/'{print $1","$2","$3","$4}' | sed -e 's/~//g' Can this be done by using sed or awk alone (4 Replies)
Discussion started by: harshakusam
4 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Solaris

The slices "usr", "opt", "tmp" disappeared!!! Help please.

The system don't boot. on the screen appears following: press enter to maintenance (or type CTRL-D to continue)...I checked with format command. ... the slices "0-root","1-swap","2-backup" exist. ...the slises "3-var","6-usr" -unassigned. :( (16 Replies)
Discussion started by: wolfgang
16 Replies

7. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

8. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

9. AIX

Apache 2.4 directory cannot display "Last modified" "Size" "Description"

Hi 2 all, i have had AIX 7.2 :/# /usr/IBMAHS/bin/apachectl -v Server version: Apache/2.4.12 (Unix) Server built: May 25 2015 04:58:27 :/#:/# /usr/IBMAHS/bin/apachectl -M Loaded Modules: core_module (static) so_module (static) http_module (static) mpm_worker_module (static) ... (3 Replies)
Discussion started by: penchev
3 Replies
Shellish(3pm)						User Contributed Perl Documentation					     Shellish(3pm)

NAME
Regexp::Shellish - Shell-like regular expressions SYNOPSIS
use Regexp::Shellish qw( :all ) ; $re = compile_shellish( 'a/c*d' ) ; ## This next one's like 'a*d' except that it'll ## match 'a/d'. $re = compile_shellish( 'a**d' ) ; ## And here '**' won't match 'a/d', but behaves ## like 'a*d', except for the possibility of high ## cpu time consumption. $re = compile_shellish( 'a**d', { star_star => 0 } ) ; ## The next two result in identical $re1 and $re2. ## The second is a noop so that Regexp references can ## be easily accomodated. $re1 = compile_shellish( 'a{b,c}d' ) ; $re2 = compile_shellish( qr/A(?:a(?:b|c)d)/ ) ; @matches = shellish_glob( $re, @possibilities ) ; DESCRIPTION
Provides shell-like regular expressions. The wildcards provided are "?", "*" and "**", where "**" is like "*" but matches "/". See "com- pile_shellish" for details. Case sensitivity and constructs like <**>, "(a*b)", and "{a,b,c}" can be disabled. compile_shellish Compiles a string containing a 'shellish' regular expression, returning a Regexp reference. Regexp references passed in are passed through unmolested. Here are the transformation rules from shellish expression terms to perl regular expression terms: Shellish Perl RE ======== ======= * [^/]* ? . ** .* ## unless { star_star => 0 } ... .* ## unless { dot_dot_dot => 0 } ( ( ## unless { parens => 0 } ) ) ## unless { parens => 0 } {a,b,c} (?:a|b|c) ## unless { braces => 0 } a a ## These are de-escaped and * * ## passed to quotemeta() The wildcards treat newlines as normal characters. Parens group in to $1..$n, since they are passed through unmolested (unless option parens => 0 is passed). This is useless when using glob_shellish(), though. The final parameter can be a hash reference containing options: compile_shellish( '**', { anchors => 0, ## Doesn't put ^ and $ around the ## resulting regexp case_sensitive => 0, ## Make case insensitive dot_dot_dot => 0, ## '...' is now just three '.' chars star_star => 0, ## '**' is now two '*' wildcards parens => 0, ## '(', ')' are now regular chars braces => 0, ## '{', '}' are now regular chars } ) ; No option affects Regexps passed through. shellish_glob Pass a regular expression and a list of possible values, get back a list of matching values. my @matches = shellish_glob( '*/*', @possibilities ) ; my @matches = shellish_glob( '*/*', @possibilities, \%options ) ; AUTHOR
Barrie Slaymaker <barries@slaysys.com> perl v5.8.8 2002-01-24 Shellish(3pm)
All times are GMT -4. The time now is 09:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy