Hi,
Suppose I have the following lines in a file:
TOM {
1
2
3
4
5
}
David {
6
7
8
9
10
}
I want to search for TOM and print out all the lines till I get the curly brace. So my output will be:
Tom {
1
2
3
4
5
}
I can do an awk but when I put that in a perl script I get errors:
> awk...
Hi,
I am trying to search and replace in a file. I am trying to look for the word: foo in every line:
foo f1 f2 f3.....
and replace it with:
foo f1 new_word f2 f3...
I think i'm close with the following line of code but not quite there yet:
$line =~ s/^foo(\s)*/.foo(\s)*new_word/;
Thanks...
Hi,
I am trying to input the user input into a variable
ex:
echo "Please enter the filename:"
set file = $<
But how can i enter mulitple filenames so the user would input at the prompt:
file1
file2
file3
Thanks
Omar.
Hi,
I have a text file w/ wildcards
file1
abcd*fg
xy*
I am trying to use foreach to read through the file but not successful because of the wildcards. I am doing:
>foreach x (`cat file1`)
>echo $x
>end
I get echo: No Match
I even used '\' before the asterisk but no luck. Can someone help...
Hi,
I am trying to pass an argument/option in the command line when calling my perl program. The argument/option should call only certain part of my program.
Can anyone help me figure this out?
Thanks
Omar.
Hi,
I am not able to search emails through Personal Folders in Outlook'07. I have Windows indexing and where it says it finished indexing but I still can't search the emails in the pst.
I have check the file type pst for indexing and its properties.
Can anyone tell me why I can't search...
Hi,
I am not able to get the correct values when I am running this script below. Basically I am putting writing everything in an array into a file 'file.txt'. Then foreach line in the file I am trying to find the file in the directory /home/omar
open (DAT, "file.txt");
@newFiles = <DAT>...
Hi,
I am trying to find a string that matches in a file.
Here is the code I have so far:
$find = "string";
open FILE, "<file.txt";
while(<FILE>)
{
if ($_ =~ /$find/)
{
$RES = "YES";
}
else
{
$RES = "NO";
}
}
close(FILE);
The string is...
Hi,
I am doing a grep to get:
a,b,c,d
and I trying to pipe sed command to make it look like
a
b
c
d
I am not having any success
sed 's/,/\r/g'
Thanks in advance
Omar.
Hi,
Could anyone point me to what i'm doing wrong here. I am not able to substitute the string in the file.
#!/usr/local/bin/perl
open(ffile, "template");
while(<ffile>)
{
s/embedit/embed/;
close(ffile);
}
Thanks in advance.
Hi,
I was just wondering if I can export a table from an access dB into excel without opening the access db?
I was wanting to do this VBScript so I can run a Windows Scheduler to automate the whole process.
Thanks in advance
Omar
Hi,
I have MS Project Server 2003. I am the administrator but for some odd reason I can't view risk or issues against a project or task.
I get the error mesasge that I don't have permission to view the page. I checked the permissions on Project Web Access but everything seems to be ok...
Hi,
I am doing a VBA code in Excel to run a Stored Procedure from SQL database.
The uid (user id) and wsid (workstation id) are specific to my username and my workstation.
How do I set them up as variables so other ppl can run it.
Here is portion of my code...
Hi,
I was wanting to insert a project in the backend (SQL Server Enterprise
Manager) through SQL Queries but I am unable to reflect that to the front end
(PWA or the Project Proj Application)
Has anyone done this before.
Thanks in advance!
Omar.
Hi,
I am new to this. I need to create IIS virtual root directory for my Windows 2003 server. Can anyone direct me to a starting point or what is the method of doing that.
Thanks
Hi,
I having trouble keeping my current view. There are two problems
that are associated with this.
1. I am trying to go to VIEW>ARRANGE BY>CURRENT VIEW>CUSTOMIZE CURRENT
VIEW
- From there I am trying to remove some of the fields. When I am done,
I see in the Inbox the view that I...
Hi,
I am newbie to PERL. I am trying to write a script that would poll a switch and find out the devices that are attached to the switch.
I will appreciate if anyone can get started or guide me.
Thanks
omar
Hi,
I am using a Global Master.mpp file to insert all the other projects. I used to be able to insert projects and the outline codes and enterprise fields show up on the top level. This is not working anymore. Does anyone know the answer to my problem?
Hi,
I have two asterisk servers in our LAN. How do I configure to dial extensions on a different server.
I have 2XX extensions for server A
3XX extensions for server B
Hi,
I understand that information kept in Enterprise Fields are stored in the enterprise global template but wonder what the significance is for the regular fields. Why should I pick a regular field?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.