Help me to understand some regular expresions usage
Can someone explain me how those restatements are constructed
1. What is the logic to use a reg-expr in variable name
2. In first string - the '#' seems to mean 'everithing after next mached', but the '.' in reg-exp is a one character, here it seems it used litteraly. Why?
3. I guess '%%' means return part that match next expression? Is it correct?
4. Why the '()' used in second string? [0-9] - any digit; '+' one or more times; so, +[0-9] should return consecutive numbers from string?! What is the need in '()'
5. How to understand third line? What is done by that whith string of digits?
Thank you
Last edited by alex_5161; 03-06-2008 at 08:42 PM..
Reason: formatting
Can someone explain me how those
restatements are constructed
1. What is the logic to use a reg-expr in variable name
2. In first string - the '#' seems to mean 'everithing after next
mached', but the '.' in reg-exp is a one character, here it seems it
used litteraly. Why?
You don't use regular expressions in parameter expansion; you use
filename expansion (a.k.a. wildcard) patterns.
I am learning SED and just following the shell scripting book, i have trouble understanding the grep and sed statement,
Question : 1
__________
/opt/oracle/work/antony>cat teledir.txt
jai sharma 25853670
chanchal singhvi 9831545629
anil aggarwal 9830263298
shyam saksena 23217847
lalit... (7 Replies)
Let's say i have 20 users logged on Server. How can I know how much memory percent used each of them is using with system time in each user? (2 Replies)
Hi all,
How am I read a file, find the match regular expression and overwrite to the same files.
open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat";
open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat";
while (<DESTINATION_FILE>)
{
# print... (1 Reply)
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
Hi All
I am not able to understand the usage of d# in the below variable declaration.
FILE_LOC contains the directory path
And also help me to know about what will be saved in the variable j.
Thanks!!!
j=${d#${FILE_LOC}/} (2 Replies)
Hi,
I want to monitor the current cpu usage, monitor usage , disk I/o and network utlization for solaris using SNMP.
I want the oids for above tasks.
can you please tell me that
Thank you (2 Replies)
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Please tell me solaris functions/api for getting following information
1- Function that tells how much memory used by current process
2- Function that tells how much memory used by all running processes
3- Function that tells how much CPU is used by current process
4- Function that tells how... (1 Reply)
how can i monitor usages of CPU, Memory, Hard disk etc. under SUN Solaries
through a c program or java program
i want to store that data into database so i can show it graphically
thanks in advance (2 Replies)