10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
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
2. UNIX for Dummies Questions & Answers
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. Shell Programming and Scripting
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
7. UNIX for Dummies Questions & Answers
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
8. Shell Programming and Scripting
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
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
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