Sponsored Content
Top Forums Shell Programming and Scripting Matching - Quick Perl Question Post 302821029 by lucshi09a on Friday 14th of June 2013 12:38:44 AM
Old 06-14-2013
this was super useful and incredibly instructive... thanks guys! Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

A very quick question

Just a super quick question: how do you put a link in your php code. I want to make a link to something in /tmp directory. i.e. how do you put a href into php, I think it's done a bit differently. thanks john (1 Reply)
Discussion started by: jmg5
1 Replies

2. Shell Programming and Scripting

Quick perl question

Hey everyone, I am a newbie with perl, and I just have a quick question that may seem really stupid. Like I said, I'm new, so please bear w/ me :) I'm trying to make a really simple program where there are two inputs. First one is just a string, and the next one is a number. Once the user... (7 Replies)
Discussion started by: jason_v
7 Replies

3. Shell Programming and Scripting

pattern matching + perl question

i can only find the first occurance of a pattern how do i set it to loop untill all occurances have changed. #! /usr/bin/perl use POSIX; open (DFH_FILE, "./dfh") or die "Can not read file ($!)"; foreach (<DFH_FILE>) { if ($_ !~ /^#|^$/) { chomp; ... (1 Reply)
Discussion started by: Optimus_P
1 Replies

4. UNIX for Dummies Questions & Answers

quick question

from command prompt I did grep two words on a same line for eg: grep abc | grep xyz and I got tht particular line, but I want to know when I vi that file how to directly search for that particular line? I appreciate if any one can provide answer, thanks in advance (2 Replies)
Discussion started by: pkolishetty
2 Replies

5. Shell Programming and Scripting

[B]Perl sort quick question[/B]

I've done a quick Google about this, but could not find the answer I want. Say, there is an array like this: @A = qw(cd1 a1 ef a2 hij a12 b2 b4 b22); I want to sort the array in the first order: @sorted = qw(a1 a12 a2 b2 b22 b4 cd1 ef hij); And second order: @sorted = qw(a1 a2 a12 b2 b4... (5 Replies)
Discussion started by: zx1106
5 Replies

6. Shell Programming and Scripting

quick question

I am using sed to find a pattern in a line and then I want to retain the pattern + the rest of the line. How is this possible? ie: line is: 14158 05-15-08 20:00 123-1234-A21/deliverable/dhm.a search for 123-1234-A21 ie: echo $line | sed 's/.*\(\{3\}-\{4\}-\{3\}\{5\}\).*/\1/' ... (1 Reply)
Discussion started by: phreezr
1 Replies

7. Shell Programming and Scripting

Quick question

When I have a file like this: 0084AF aj-123-a NAME Ajay NAME Kumar Engineer 015ED6 ck-345-c 020B25 ef-456-e 027458 pq-890-p NAME Peter NAME Salob Doctor 0318F0 xy-123-x NAME Xavier Arul NAME Yesu Supervisor 0344CA de-456-d where - The first NAME is followed by... (6 Replies)
Discussion started by: ajay41aj
6 Replies

8. Shell Programming and Scripting

PERL - another quick hash of hashes question

Hi, sorry, two hash related questions in one day .. but this has got me a bit stuck. I have a mysql database table that kind of looks like this, the table is called "view1" and a snippet of that table (SELECT'ing just rows with serial number 0629AN1200) is below serial nic_name ... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

9. UNIX for Dummies Questions & Answers

Quick question

Hi guys Quick question Im creating an FTP server and im chrooting each user to there home directory blah blah. Ive also setup scponly so there locked etc. Im a novice at unix and have just reaslised the primary group of scponly is the username of one of the ftp users... which im sure... (1 Reply)
Discussion started by: mokachoka
1 Replies

10. UNIX for Dummies Questions & Answers

Perl Pattern Matching Question

Hi all, I have a pattern matching problem in which i'm not sure how to attack. Here is my problem: I have a list of strings that appear in the following format: String: LE_(1234 ABC)^2^ABC^DEFG What i need to do is replace all the characters after the first ^ with blank. So the output... (2 Replies)
Discussion started by: WongSifu
2 Replies
All times are GMT -4. The time now is 04:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy