Sponsored Content
Top Forums Shell Programming and Scripting sed make me headache... need help! Post 69067 by nymus7 on Monday 11th of April 2005 08:22:08 AM
Old 04-11-2005
Hi reborg

Great it worksSmilie... Thankx a lot!
Could you please explain me, why the expression \(.*\)[.][0-9]* doesn't take the port number? Is the bracket \(\) egal to \{\}?

rg nymus
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extremely headache

I need to execute command at remote host from my program. there is rs6000/aix standard command called rexec. unfortunately rexec ask username and password which must supplied interactively, of course it is impossible runned by program. So I have to change rexec command format to make user-name... (5 Replies)
Discussion started by: yatno
5 Replies

2. IP Networking

DHCP client & ipchains headache

Hi all, I upgraded my SUSE 6.1 to SUSE 7.1 and at once the following things won't work anymore: 1) My DHCP client is not able anymore to retrieve my IP address from the @home server. It times out all the time. If I use a fixed IP I can get on the net, so there is no physical problem. 2) I... (3 Replies)
Discussion started by: Micky
3 Replies

3. Solaris

A very headache problem

guys, need your help~~~~ I am setting up a Sun Enterprise 450 Ultra 4 server originally I was using Sun solaris 9 1202 version. but after an accident (i guess becoz i deleted something wrongly), the system cannot boot up. and now I wana install a FreeBSD(since it is free and it will... (3 Replies)
Discussion started by: MrDJay
3 Replies

4. Shell Programming and Scripting

Make sed ignore lines

Hi I use sed in a script for severall changes in files. I whish one of the substitutions I made to be aplied to every line that has the word "scripts" with the exception for the ones that start with "rsh", wich I wish sed to ignore . Is this possible? If yes, how can I do it? The substitution... (2 Replies)
Discussion started by: Scarlos
2 Replies

5. UNIX for Dummies Questions & Answers

sed headache

Hi all, I've got a thorny sed/regex problem and I thought somebody out there might be able to help. I'd like to use sed in a Makefile to parse a path string. The path might look like this: case 1: /mnt/users/bob/build/src or case 2: /mnt/users/bob/build/src/foo or case 3: ... (4 Replies)
Discussion started by: gnarl
4 Replies

6. Shell Programming and Scripting

scripting headache... loops & variables

Surely there's an easier way to do this, lets see if anyone knows! I am new to scripting so go easy on me! I have the following script and at the moment it doesn't work and I believe the problem is that I am using a while loop within a while loop. When I run the script using sh -x I can see... (6 Replies)
Discussion started by: StevePace
6 Replies

7. Shell Programming and Scripting

Friday afternoon headache

Hi all, It's been a long week and my brain is clearly not functioning right so hopefully someone can help me out here. I've got a function in a script which just checks if a MySQL database directory exists or not. Code is as follows: dbCheck2() { if ; then { : # carry... (4 Replies)
Discussion started by: _Spare_Ribs_
4 Replies

8. UNIX for Dummies Questions & Answers

formatting a file headache

Hello does anyone know how to do the following using some simple unix if possible: I have a file with the following info as comma separated. It shows username, id number and all the subjects they are enrolled in on the one line. The subjects are separated by colons. UserName,ID,Subject... (13 Replies)
Discussion started by: ynneycat
13 Replies

9. UNIX for Advanced & Expert Users

ssh command headache

Good day, I am trying to run a ssh command on a remote server, but when I run the command the server takes FOREVER... and ends up giving me an error.. then the script also kicks server load up by 100% while it is running.. But if I run the same command on the server it goes pretty quickly and... (3 Replies)
Discussion started by: msullivan
3 Replies

10. Shell Programming and Scripting

Beginner: script headache

Hi, I am new to shell scripting, but doing my best to learn things. Today doing courses there was exercise like this: #!/usr/bin/bash a=$1 b=$2 if ] then echo "Conditions are met" else echo "Conditions are not met" fi I improved it a little, beacuse of curiosity :D to this: ... (8 Replies)
Discussion started by: Rosentine
8 Replies
pbind(1M)                                                 System Administration Commands                                                 pbind(1M)

NAME
pbind - control and query bindings of processes or LWPs SYNOPSIS
pbind -b processor_id pid [/lwpid]... pbind [-q] [pid [/lwpid]...] pbind -Q [processor_id...] pbind -u pid [/lwpid]... pbind -U [processor_id...] DESCRIPTION
pbind controls and queries bindings of processes and LWPs (lightweight processes) to processors. pbind can also remove processor bindings that were previously established. When an LWP is bound to a processor, it will be executed only by that processor except when the LWP requires a resource that is provided only by another processor. The binding is not exclusive, that is, the processor is free execute other LWPs as well. Bindings are inherited, so new LWPs and processes created by a bound LWP will have the same binding. Binding an interactive shell to a pro- cessor, for example, binds all commands executed by the shell. Superusers may bind or unbind any process or LWP, while other users can bind or unbind any process or LWP for which they have permission to signal, that is, any process that has the same effective user ID as the user. OPTIONS
The following options are supported: -b processor_id Binds all or a subset of the LWPs of the specified processes to the processor processor_id. Specify processor_id as the processor ID of the processor to be controlled or queried. processor_id must be present and on-line. Use the psrinfo command to determine whether or not processor_id is present and on-line. See psrinfo(1M). -q Displays the bindings of the specified processes or of all processes. If a process is composed of multiple LWPs which have different bindings and the LWPs are not explicitly specified, the bindings of only one of the bound LWPs will be displayed. The bindings of a subset of LWPs can be displayed by appending "/lwpids" to the process IDs. Multiple LWPs may be selected using "-" and "," delimiters. See EXAMPLES. -Q Displays the LWPs bound to the specified list of processors, or all LWPs with processor bindings. For processes composed of multiple LWPs, the bindings of individual LWPs will be displayed. -u Removes the bindings of all or a subset of the LWPs of the specified processes, allowing them to be executed on any on-line processor. -U Removes the bindings of all LWPs bound to the specified list of processors, or to any processor if no argument is specified. OPERANDS
The following operands are supported: pid The process ID of the process to be controlled or queried. lwpid The set of LWP IDs of the specified process to be controlled or queried. The syntax for selecting LWP IDs is as follows: 2,3,4-8 LWP IDs 2, 3, and 4 through 8 -4 LWPs whose IDs are 4 or below 4- LWPs whose IDs are 4 or above processor_id The processor ID of the processor to be controlled or queried. EXAMPLES
Example 1: Binding Processes The following example binds processes 204 and 223 to processor 2: example% pbind -b 2 204 223 process id 204: was 2, now 2 process id 223: was 3, now 2 Example 2: Unbinding a Process The following example unbinds process 204: example% pbind -u 204 Example 3: Querying Bindings The following example queries bindings. It demonstrates that process 1 is bound to processor 0, process 149 has at least one LWP bound to CPU3, and process 101 has no bound LWPs. example% pbind -q 1 149 101 process id 1: 0 process id 149: 3 process id 101: not bound Example 4: Querying LWP Bindings The following example queries bindings of LWPs. It demonstrates that LWP 1 of process 149 is bound to CPU3, and LWP 2 of process 149 is not bound. example% pbind -q 149/1-2 lwp id 149/1: 3 lwp id 149/2: not bound Example 5: Querying LWP Bindings for Processor 2: The following example queries all LWPs bound to processor 2: example% pbind -Q 2 lwp id 149/4: 2 lwp id 149/5: 2 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ EXIT STATUS
The following exit values are returned: 0 Successful completion. >0 An error occurred. SEE ALSO
psradm(1M), psrinfo(1M), psrset(1M), processor_bind(2), processor_info(2), sysconf(3C), attributes(5) DIAGNOSTICS
pbind: cannot query pid 31: No suchprocess The process specified did not exist or has exited. pbind: cannot bind pid 31: Not owner The user does not have permission to bind the process. pbind: cannot bind pid 31: Invalid argument The specified processor is not on-line. SunOS 5.10 18 July 2004 pbind(1M)
All times are GMT -4. The time now is 02:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy