Sponsored Content
Homework and Emergencies Homework & Coursework Questions Cannot correctly connect multi-stage C command pipe (among others) (FYI: a lot of code) Post 302787953 by Corona688 on Sunday 31st of March 2013 02:07:25 PM
Old 03-31-2013
Also, exit(666) makes no sense. It only takes numbers 1-127.
 

9 More Discussions You Might Find Interesting

1. Solaris

Solaris has a lot of bugs, fstream wont write to file correctly!

I've got a c++ program that works fine on Linux, compiles on Solaris fine with g++, but will not write to a fstream correctly in a class object. And I've run into numerous other bugs in the disk management. Jon (4 Replies)
Discussion started by: Joncamp
4 Replies

2. Shell Programming and Scripting

How to get exit code in a pipe-lined command?

I have a question about how to get the exit code of the first command when it appears in a pipe-lined command. For example, I have the following script: grep abc dddd | tee -a log if ] then echo "ERROR!" fi In the above script, ] is supposed to test the exit code of "grep abc... (3 Replies)
Discussion started by: pankai
3 Replies

3. Shell Programming and Scripting

find command takes a lot of time ( can I skip directories)

I have a file called "library" with the following content libnxrdbmgr.a libnxrdbmgr.so libnxtk.a libnxtk.so libora0d_nsc_osi.so I am trying to locate if these libraries are on my machine or not. find command runs for about few seconds and hangs after this. Can someone please help me and... (3 Replies)
Discussion started by: knijjar
3 Replies

4. UNIX for Dummies Questions & Answers

Date command to obtain the last month is not working correctly..

Hello, I could not find the exactly same post here.. so I will explain what I did to get the last month using date command. I used date +%Y-%m -d "-1 months" to get the last month. However, the returned value of above command on 2009/10/31 was 2009 10 and not 2009 09.. and the... (9 Replies)
Discussion started by: tigersk
9 Replies

5. UNIX for Advanced & Expert Users

command taking lot of time to execute

Hi, I am running the following command, and it tries to delete some dn from ldap, however, it takes lot of time before it finally request LDAP server to delete it. I am trying to find why it is taking lot of time. Could you anyone help me in this regard. I have copies the pstack output, and... (3 Replies)
Discussion started by: john_prince
3 Replies

6. UNIX for Dummies Questions & Answers

[Solved] Why code run not correctly

Hi there can anyone help me here is my code echo "Type in a positive number" read X I=2 while do if then echo "It is not prime" break else if then echo "It is prime" break else I=$(( $I + 1)) fi fi (4 Replies)
Discussion started by: FUTURE_EINSTEIN
4 Replies

7. Solaris

Can I run repair on lot of blocks with single command ?

Hi, I have Solaris-10 OS on T5220. Both local disks were mirrored under SVM. Somehow when one disk gone bad (c0t1d0), other disk (c0t0d0) also got lot of bad block. We have readable data only on c0t0d0, but as soon as server comes after, it hangs when I run few commands because of read errors,... (1 Reply)
Discussion started by: solaris_1977
1 Replies

8. UNIX for Beginners Questions & Answers

How to compile a Datastage Job using Execute Command Stage or Routines in Datastage 11?

I am trying to compile the datastage jobs using the Execute Command stage in datastage 11 or any Routines if possible. My datastage is on Unix machine. So, How can I Compile a datastage job in UNIX from command line or any Routines. Please help me in doing so. Thank you. (1 Reply)
Discussion started by: elena jessi
1 Replies

9. Shell Programming and Scripting

Egrep -v command not filtering correctly

Hello guys, I have an issue when trying to do an egrep -v on a file, let me show you. I want to filter the last column as to where it filters out the columns with asterisks and zeros ( * and 0 ) it is working properly up to a certain point where I have a value of '10000' which is also getting... (3 Replies)
Discussion started by: evergreen
3 Replies
HAL-LOCK(1)						      General Commands Manual						       HAL-LOCK(1)

NAME
hal-lock - lock an interface SYNOPSIS
hal-lock [options] DESCRIPTION
hal-lock can be used to acquire a lock on a given interface either on a given device or globally. For more information about both the big picture and the semantics of HAL locks, refer to the HAL spec which can be found in /usr/share/doc/hal-doc/spec/hal-spec.html depending on the distribution. OPTIONS
The following options are supported: --interface The name of the interface to lock. --run Program to run if the lock was acquired. --udi The UDI (Unique Device Identifier) of the device object. If this is ommitted, the global lock will be tried. --exclusive Whether the lock can be held by others. --exit-with-lock Kill the program if the acquired lock is lost. This only makes sense if you pass a specific UDI due to the semantics of HAL locks. --exit-with-dev Kill the program if the device is removed. This only makes sense if you pass a specific UDI due to the semantics of HAL locks. --help Print out usage. --version Print the version. RETURN VALUE
This program will attempt to grab a lock on a given interface. Unless, a specific UDI is given, the global lock will be tried. If the lock was succesfully acquired the program specified by the option --run will be run and upon termination this program will exit with exit code 0. If the lock wasn't acquired or an error occured while taking the lock, this program will exit with a non-zero exit code and the given program will not be run. NOTES
This program is only useful for launching software that doesn't use HAL at all (since such software launched using hal-lock would be locked out itself); for example a partition table editor part-foo may use wrapper script like this hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive --run /path/to/part-foo-program BUGS
Please send bug reports to either the distribution or the HAL mailing list, see http://lists.freedesktop.org/mailman/listinfo/hal on how to subscribe. SEE ALSO
hald(8), lshal(1), hal-get-property(1), hal-set-property(1), hal-find-by-property(1), hal-find-by-capability(1) AUTHOR
Written by David Zeuthen <david@fubar.dk> with a lot of help from many others. HAL-LOCK(1)
All times are GMT -4. The time now is 11:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy