Sponsored Content
Top Forums Shell Programming and Scripting Search for Files and clear line after results Post 302255797 by foz on Friday 7th of November 2008 06:18:15 AM
Old 11-07-2008
Search for Files and clear line after results

Hi,

this is a little strange, i have the following code:

Code:
if [ -d /usr/local/psa/admin/sbin/ ]
then
echo -e "psa/admin/sbin present                 [\033[31mYES\033[0m]"

which shows if a directory is present, but what I would like it to do is show the line and then remove its self and show the rest of the script... no idea what to look for. tried a search but got no where.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Search and replace multi-line text in files

Hello I need to search for a mult-line text in a file exfile1 and replace that text with another text. The text to search for is in exfile2 and the replacement text is in exfile3. I work with kornshell under AIX and need to do this with a lot of files. (the file type is postscript and they need... (10 Replies)
Discussion started by: marz
10 Replies

2. Shell Programming and Scripting

Operations on search results

Hi, I am a newbie at Unix scritping, and I have a question. Looking at the search functionality on Unix. Here I have a structure root---------dir1 ------- file1, file2, file3 |_____dir2 ______file1@, file4 |_____dir3_______file1@, file5 Under root directory, I... (4 Replies)
Discussion started by: nj302
4 Replies

3. Shell Programming and Scripting

How can I clear a line of a file?

Hello, I want to clear or modify a line of a file. It is possible by cat filename | sed '3d' for example. But If I want "3" to be a variable? I can't do sed '$var d' Help me please Thank you very much (1 Reply)
Discussion started by: Nene
1 Replies

4. UNIX for Dummies Questions & Answers

Displaying the Second Line of the Grep Search Results

Hi I really hope someone can help with the below question. Lets say that I have a file called output.txt and I want to display all of the lines which contain the word ‘disconnect'. I know that this can easily be obtained by using the following command: grep -i disconnect output.txt However,... (6 Replies)
Discussion started by: Sunny Sid
6 Replies

5. Shell Programming and Scripting

perl search and replace - search in first line and replance in 2nd line

Dear All, i want to search particular string and want to replance next line value. following is the test file. search string is tmp,??? ,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50 tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
3 Replies

6. Shell Programming and Scripting

Can ctag and cscope support recording search results and displaying the history results ?

Hello , When using vim, can ctag and cscope support recording search results and displaying the history results ? Once I jump to one tag, I can use :tnext to jump to next tag, but how can I display the preview search result? (0 Replies)
Discussion started by: 915086731
0 Replies

7. Shell Programming and Scripting

Need to exclude .NFSxxx files in clear old files batch script

I am new to Shell Scripting and need some help. The following batch job has been failing for me due to the .nfsxxx files in use. I need to know how to modify the following script to exclude the .nfsxxx files so this batch job will not fail on me. I have done lots of googling and keep coming back... (2 Replies)
Discussion started by: kimberlyg2007
2 Replies

8. Shell Programming and Scripting

Finding files with the name of the results of another search

Dear All, I have a file with this name= xx-nnnn.csv , I has texts in this format, 231048975938093056;234317862284705793;609384034;14955353;1344700706000;1; 231048975938093056;234317958632054785;715450794;52422878;1344700729000;1;... (10 Replies)
Discussion started by: davidfreed
10 Replies

9. What is on Your Mind?

Search Results (Search, New, and Today's Topics) Animation Switch

Hey, I added an animation switch on the search results page; so by default the thread previews are off, but if you want to look at them, just click on the green button and the thread previews will turn on (and back off). See image and attached animation: ... (1 Reply)
Discussion started by: Neo
1 Replies
pooladm(1M)															       pooladm(1M)

NAME
pooladm - activate and deactivate the resource pools facility SYNOPSIS
/usr/sbin/pooladm [-n] [-s] [-c] [filename] | -x /usr/sbin/pooladm [-d | -e] The pooladm command provides administrative operations on pools and sets. pooladm reads the specified filename and attempts to activate the pool configuration contained in it. Before updating the current pool run-time configuration, pooladm validates the configuration for correctness. Without options, pooladm prints out the current running pools configuration. The following options are supported: -c Instantiate the configuration at the given location. If a filename is not specified, it defaults to /etc/pooladm.conf. -d Disable the pools facility so that pools can no longer be manipulated. -e Enable the pools facility so that pools can be manipulated. -n Validate the configuration without actually updating the current active files. Checks that there are no syntactic errors and that the configuration can be instantiated on the current system. No validation of application specific properties is performed. -s Update the specified location with the details of the current dynamic configuration. This option requires update permission to the configuration that you are going to instantiate. If you use this option with the -c option, the dynamic configuration is updated before the static location. -x Remove the currently active pool configuration. Destroy all defined resources, and return all formerly partitioned compo- nents to their default resources. The following operands are supported: filename Use the configuration contained within this file. Example 1: Instantiating a Configuration The following command instantiates the configuration contained at /home/admin/newconfig: example# /usr/sbin/pooladm -c /home/admin/newconfig Example 2: Validating the Configuration Without Instantiating It The following command attempts to instantiate the configuration contained at /home/admin/newconfig. It displays any error conditions that it encounters, but does not actually modify the active configuration. example# /usr/sbin/pooladm -n -c /home/admin/newconfig Example 3: Removing the Current Configuration The following command removes the current pool configuration: example# /usr/sbin/pooladm -x Example 4: Enabling the Pools Facility The following command enables the pool facility: example# /usr/sbin/pooladm -e Example 5: Saving the Active Configuration to a Specified Location The following command saves the active configuration to /tmp/state.backup: example# /usr/sbin/pooladm -s /tmp/state.backup /etc/pooladm.conf See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWpool | +-----------------------------+-----------------------------+ |Interface Stability |See below. | +-----------------------------+-----------------------------+ The invocation is Evolving. The output is Unstable. poolcfg(1M), poolbind(1M), psrset(1M), pset_destroy(2), libpool(3LIB), attributes(5) Resource bindings that are not presented in the form of a binding to a partitionable resource, such as the scheduling class, are not neces- sarily modified in a pooladm -x operation. The pools facility is not active by default when Solaris starts. pooladm -e explicitly activates the pools facility. The behavior of cer- tain APIs related to processor partitioning and process binding are modified when pools is active. See libpool(3LIB). You cannot enable the pools facility on a system where processor sets have been created. Use the psrset(1M) command or pset_destroy(2) to destroy processor sets manually before you enable the pools facility. 15 Feb 2005 pooladm(1M)
All times are GMT -4. The time now is 04:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy