Sponsored Content
Operating Systems Linux SuSE Find command doesn't pipe the output as required. Post 302940199 by Vipin Batra on Thursday 2nd of April 2015 05:05:55 AM
Old 04-02-2015
Hi Walter,

I am running this on HP-UX box (k shell). It doesn't really work for me and I am not understanding why Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Man command doesn't display any output amonst other problems :-)

hi all, Newbie to Unix and AIX. So my apologies if this is in the wrong place, etc. Working on box - uname# uname -a AIX appt 3 5 00C08AAF4C00 when i type man (some valid command) it just returns me to the # prompt. Its running on the KSH shell. man was working but i was trying... (14 Replies)
Discussion started by: djdavies
14 Replies

2. AIX

Man command doesn't display any output amonst other problems

hi all, Newbie to Unix and AIX. So my apologies if this is in the wrong place, etc. Working on box - uname# uname -a AIX appt 3 5 00C08AAF4C00 when i type man (some valid command) it just returns me to the # prompt. Its running on the KSH shell. man was working but i was trying... (6 Replies)
Discussion started by: djdavies
6 Replies

3. Cybersecurity

Help Required: Command to find IP address and command executed of a user

Hi, I am trying to write a script which would figure out who has run which command and their IP. As i dont have any clue as to which commands would do this job, i request some gurus to help me on this. Thanks Vishwas (2 Replies)
Discussion started by: loggedout
2 Replies

4. Shell Programming and Scripting

Assign command (with pipe) output to a variable

Hi , I would like to assign command (with pipe) output to a variable. The code is as follows. The goal of the code is to get the last folder folder with a particular name pattern. myDate=`ls | grep 2009 | tail -1` echo "myDate=" $myDate However, in the presence of the pipe, the code... (3 Replies)
Discussion started by: jeff_cen
3 Replies

5. UNIX for Dummies Questions & Answers

is there any way of using rm command on output of pipe

Hi, I am having a list of directories with different login id's. My requirement is that i need to list the directories of my id and need to delete them. So i am using following code ls -ltr ¦ grep userid ¦ rm -rf But this is not working. So is there any way of doing it. Please note... (3 Replies)
Discussion started by: sarbjit
3 Replies

6. UNIX for Advanced & Expert Users

Pipe text in to find command

I would like to know why this command does not work. I have a script which connects to and ftp site. After getting the remote files localy i need move each remote file to a archive folder on the FTP site *Please also note that some of the files have spaces in the file name. Im trying to... (3 Replies)
Discussion started by: juanjanse
3 Replies

7. Shell Programming and Scripting

Pipe output a command to another using xargs

xargs work great when a command gives multiple line output which can be input to another. In my case it is not working coz the second command uses two words in it. $ scr.sh gives output like 193740 638102 375449 .. .. another command takes these number as inputs. it works great... (1 Reply)
Discussion started by: mahesh113
1 Replies

8. Shell Programming and Scripting

How to pipe command output to shell script?

Hi Team, Need a help on how to pipe a command out put to a shell script. My shell script looks like below. cat shell_script #!/usr/bin/ksh input =$@ echo " we are inside the shell script" echo " here are the input parameters" .......................... .................. ... (11 Replies)
Discussion started by: gvkumar25
11 Replies

9. Shell Programming and Scripting

Find or ls with pipe to the command file

Hello all! I am trying to find the "Notes" backup from my iPhone in my folder ~/Library/Application\ Support/MobileSync/Backup/ which used to be in the sqlite file ca3bc056d4da0bbf88b5fb3be254f3b7147e639c. But since an update of the MacOS it is still there, but not updated anymore. (This is... (9 Replies)
Discussion started by: marek
9 Replies

10. Shell Programming and Scripting

Get the output of w command in pipe delimited format

Since output of w command have variable number of columns I want to get the output in pipe delimited format. I tried export OFS="|"; w but that does not work. Any ideas? (4 Replies)
Discussion started by: Soham
4 Replies
reptyr(1)						      General Commands Manual							 reptyr(1)

NAME
reptyr - Reparent a running program to a new terminal SYNOPSIS
reptyr PID reptyr -l DESCRIPTION
reptyr is a utility for taking an existing running program and attaching it to a new terminal. Started a long-running process over ssh, but have to leave and don't want to interrupt it? Just start a screen, use reptyr to grab it, and then kill the ssh session and head on home. reptyr works by attaching to the target program using ptrace(2), redirecting relevant file descriptors, and changing the program's controlling terminal (See tty(4)) It is this last detail that makes rep- tyr work much better than alternatives such as retty(1). After attaching a program, the program will appear to be either backgrounded or suspended to the shell it was launched from (depending on the shell). For maximal safety you can run bg; disown in the old shell to remove the association with the program, but reptyr will attempt to ensure that the target program remains running even if you close the shell without doing so. OPTIONS
-l Instead of attaching to a new process, create a new pty pair, proxy the master end to the current terminal, and then print the name of the slave pty. This can be passed to e.g. gdb's set inferior-tty option. -s By default, reptyr will move any file descriptors in the target that were connected to the target's controlling terminal to point to the new terminal. The -s option will cause reptyr to unconditionally attach file descriptors 0, 1, and 2 in the target, even if the target has no controlling terminal or they are not connected to a terminal. -v Print the version of reptyr and exit. -h Print a usage message and exit. NOTES
reptyr depends on the ptrace(2) system call to attach to the remote program. On Ubuntu Maverick and higher, this ability is disabled by default for security reasons. You can enable it temporarily by doing # echo 0 > /proc/sys/kernel/yama/ptrace_scope as root, or permanently by editing the file /etc/sysctl.d/10-ptrace.conf, which also contains more information about this setting. BUGS
When attaching to some curses programs, they will not redraw the screen right away, and a ^L or similar will be needed to force a redraw. Similarly, after attaching to certain programs, the old terminal will be left in an odd state, and a clear or even reset may be required before the old terminal is usable again. Attaching to rtorrent (and probably some other apps) doesn't work right (rtorrent stops accepting input) (The problem is that rtorrent is using epoll to poll stdin, and we don't update the internal reference that the epoll fd has to the old tty). Attaching to a process with children doesn't work right. This should be possible to fix -- I just need to ptrace each child individually and do the same games to it. Attaching a less(1) process doesn't work if you have a .lessfilter file, as less leaves around a zombie child in this case. This could be worked around. Bugs should be reported to the author (see below) or via the issue tracker on GitHub. AUTHORS
reptyr was written by Nelson Elhage <nelhage@nelhage.com>. HOMEPAGE
<https://github.com/nelhage/reptyr> SEE ALSO
neercs(1), screen(1) 03 Feb 2011 reptyr(1)
All times are GMT -4. The time now is 05:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy