Now that I have found with Locate, how to copy?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Now that I have found with Locate, how to copy?
# 8  
Old 02-19-2010
> The problem is that the shell isn't even looking at
> the output of your first command. The shell's fd
> for stdout is simply being copied into the
> subprocess that is running find/aptitude/etc. and
> that is outputing directly to your console.

Thanks, I did not realize how the different parts work together. Actually, I still don't, but now I have some terms to google on.


> You could write a short script or alias to select
> lines that you want so that "aptitude search qt |
> grep ruby | scriptA 2 5" would pull out those two
> lines and put them in a hidden file that can be
> found by a second script. Then "scriptB sudo
> apt-get install" would run the install on every line
> of the file.

That might be a good exercise, I'll try that. Thanks.

---------- Post updated at 05:10 PM ---------- Previous update was at 05:03 PM ----------

I found screen this morning, which does most of what I am looking for:
Screen - Gentoo Linux Wiki
GNU Screen: an introduction and beginner's tutorial || kuro5hin.org
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Locate the files in the first column and copy the files in 2nd column

#cat data.txt file1 folder1 file2 thisforfile2 file3 thisfolderforfile3 lata4 folder4 step 1: create the folder first in column 2 for i in `awk '{print $2}' data.txt` do mkdir /home/data/$i done step 2: locate the files in column1 and stored them into a file for i in... (17 Replies)
Discussion started by: kenshinhimura
17 Replies

2. Red Hat

Can't locate DBI.pm in @INC

my os details as follow bash-3.2$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.8 (Tikanga) I run the following and encounter the following error bash-3.2$ mysqlhotcopy -? Can't locate DBI.pm in @INC (@INC contains:... (5 Replies)
Discussion started by: jediwannabe
5 Replies

3. Shell Programming and Scripting

Copy/print all lines between pattern is found in .log files

Hi, I have a folder with multiple (< 33) .log files. And I have to copy the lines between two patterns from all the .log files to a new file. (script file with a loop?) Thanks in advance. 1.log ... .. xx1> begin ... .. .. >>> Total: 2 Alarms .. .. (17 Replies)
Discussion started by: AK47
17 Replies

4. UNIX for Advanced & Expert Users

getting error "ssh-copy-id: not found"

Hello, i am trying to make an ssh connection from one server to another and invoke a script on another server. while doing this i want to do a passwordless ssh connection for the same, for which i have used the following command ssh-keygen -t rsa ssh-copy-id -i... (3 Replies)
Discussion started by: arwant
3 Replies

5. Linux

Help to locate the files

I m new to the linux environment.Help me with ur suggestions. How can i obtain the file names alone from ls -ltr output?? And those files should have been created before three months and earlier than that.. Thanks and wishes, Rupaa. (8 Replies)
Discussion started by: Rupaa
8 Replies

6. UNIX for Dummies Questions & Answers

command locate.

Hi, I am aware of the command locate/slocate. But when I try to search the file which is located in /tmp. Its not able to get it. I tried by updating the database also with the command updatedb. Is there any consern that the command 'locate' dont check /tmp??? And I knew that locate is the... (5 Replies)
Discussion started by: praveen_b744
5 Replies

7. Shell Programming and Scripting

How to copy file and locate in new folder?

Hi All, Please advise me how to make a copy of file from a list and store in one particular location? For example , I have aaa.txt which contains as below, But, those *usg files might be randomly store in different location.... > cat aaa.txt adc.usg dfdjkf.usg ugjfk.usg And I want... (3 Replies)
Discussion started by: cedrichiu
3 Replies

8. Shell Programming and Scripting

how can i check in csh if command found or not found ?

hello all im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : set MemoryInfo = `top | grep Memory` if (... (2 Replies)
Discussion started by: umen
2 Replies

9. Solaris

Equivalent to locate

Does Solaris 10 have an equivalent to FreeBSD's `locate'? If not, what is the best way to search for files (allowing regexp) throughout the system? (5 Replies)
Discussion started by: Russell
5 Replies

10. UNIX for Dummies Questions & Answers

not able to locate SSH

In our unix environment I'm not able to locate where ssh is located. can any one guide me in finding the location of this tool. (5 Replies)
Discussion started by: bishweshwar
5 Replies
Login or Register to Ask a Question
shell(1F)							   FMLI Commands							 shell(1F)

NAME
shell - run a command using shell SYNOPSIS
shell command [command] ... DESCRIPTION
The shell function concatenate its arguments, separating each by a space, and passes this string to the shell ($SHELL if set, otherwise /usr/bin/sh). EXAMPLES
Example 1: A sample output of shell command. Since the Form and Menu Language does not directly support background processing, the shell function can be used instead. `shell "build prog > /dev/null &"` If you want the user to continue to be able to interact with the application while the background job is running, the output of an exe- cutable run by shell in the background must be redirected: to a file if you want to save the output, or to /dev/null if you don't want to save it (or if there is no output), otherwise your application may appear to be hung until the background job finishes processing. shell can also be used to execute a command that has the same name as an FMLI built-in function. NOTES
The arguments to shell will be concatenate using spaces, which may or may not do what is expected. The variables set in local environments will not be expanded by the shell because "local" means "local to the current process." ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
sh(1), attributes(5) SunOS 5.10 5 Jul 1990 shell(1F)