PID length


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting PID length
# 15  
Old 01-20-2008
MySQL Noted your trick , thanks Ghostdog

Smilie Ghostdog , that was a good piece, But at times feel I can type "grep -v grep " much faster than trying to escape the /'s when using awk.

for an example , to grep the '/etc/init' , I feel that the second way is pretty easier and faster to type


UID PID PPID C STIME TTY TIME CMD
root 1 0 0 Jan 14 - 40:54 /etc/init


team$ ps -ef | awk '/\/etc\/init/ { print $0 }'
root 1 0 0 Jan 14 - 40:53 /etc/init
team$

team$ ps -ef | grep '/etc/init' | grep -v grep
root 1 0 0 Jan 14 - 40:55 /etc/init
team$
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Flat file-make field length equal to header length

Hello Everyone, I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table. Input Data- ------ ------------------------ ---- ----------------- WFI001 Xxxxxx Control Work Item A Number of Records ------ ------------------------... (5 Replies)
Discussion started by: sonali.s.more
5 Replies

2. Shell Programming and Scripting

changing a variable length text to a fixed length

Hi, Can anyone help with a effective solution ? I need to change a variable length text field (between 1 - 18 characters) to a fixed length text of 18 characters with the unused portion, at the end, filled with spaces. The text field is actually field 10 of a .csv file however I could cut... (7 Replies)
Discussion started by: dc18
7 Replies

3. Shell Programming and Scripting

Make variable length record a fixed length

Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types: (H)eader Records (D)etail Records (T)railer Records The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
Discussion started by: jclanc8
3 Replies

4. UNIX for Dummies Questions & Answers

What the command to find out the record length of a fixed length file?

I want to find out the record length of a fixed length file? I forgot the command. Any body know? (9 Replies)
Discussion started by: tranq01
9 Replies

5. UNIX for Dummies Questions & Answers

Need to get pid of a process and have to store the pid in a variable

Hi, I need to get the pid of a process and have to store the pid in a variable and i want to use this value(pid) of the variable for some process. Please can anyone tell me how to get the pid of a process and store it in a variable. please help me on this. Thanks in advance, Amudha (7 Replies)
Discussion started by: samudha
7 Replies

6. UNIX for Dummies Questions & Answers

Session PID & socket connection pid

1. If I use an software application(which connects to the database in the server) in my local pc, how many PID should be registered? Would there be PID for the session and another PID for socket connection? 2. I noticed (through netstat) that when I logged in using the my software application,... (1 Reply)
Discussion started by: pcx26
1 Replies

7. UNIX for Dummies Questions & Answers

Sed working on lines of small length and not large length

Hi , I have a peculiar case, where my sed command is working on a file which contains lines of small length. sed "s/XYZ:1/XYZ:3/g" abc.txt > xyz.txt when abc.txt contains lines of small length(currently around 80 chars) , this sed command is working fine. when abc.txt contains lines of... (3 Replies)
Discussion started by: thanuman
3 Replies

8. Programming

printing ppid,child pid,pid

question: for the below program i just printed the value for pid, child pid and parent pid why does it give me 6 values? i assume ppid is 28086 but can't figure out why there are 5 values printed instead of just two! can someone comment on that! #include<stdio.h> #define DIM 8 int... (3 Replies)
Discussion started by: a25khan
3 Replies

9. Shell Programming and Scripting

creating a fixed length output from a variable length input

Is there a command that sets a variable length? I have a input of a variable length field but my output for that field needs to be set to 32 char. Is there such a command? I am on a sun box running ksh Thanks (2 Replies)
Discussion started by: r1500
2 Replies
Login or Register to Ask a Question
QUICKPLOT_SHELL(1)					      General Commands Manual						QUICKPLOT_SHELL(1)

NAME
quickplot_shell - a remote command line shell for quickplot SYNOPSIS
Usage: quickplot_shell [PID]|[-h|--help]|[QUICKPLOT_OPTIONS] DESCRIPTION
Quickplot is an interactive 2D plotter. It's primary focus is to interactively display 2D plots. quickplot_shell connects to a running Quickplot program. quickplot_shell provides a command line interface for most of the graphical user interfaces that are in the Quickplot program. quickplot_shell reads and writes to standard input and standard output respectively. When standard input is a tty device quick- plot_shell enables readline tab completion and history. If you would like to save your Quickplot shell history between sessions just cre- ate a .quickplot_history in your home directory with a command like `touch ~/.quickplot_history'. If the argument option PID is not given, quickplot_shell will launch Quickplot as a new process and connect to that new process. In this case Quickplot will be started with QUICKPLOT_OPTIONS if any are given. If PID is given, quickplot_shell will connect to a running Quickplot program with process ID PID. quickplot_shell sets up two named pipes, signals the running Quickplot program and writes commands and reads responses to and from the pipe. The named pipes will be unlinked as soon as they are connected, and hence will be removed automatically when the two programs are no longer running. quickplot_shell, the remote Quickplot shell, acts just like running quickplot --shell, a local Quickplot shell, but quickplot_shell runs as a separate process and talks to the Quickplot program using pipes, where as quickplot --shell runs one process with both the GUI and the shell with no pipes. You may connect as number of remote Quickplot shells to a Quickplot program. -h, --help display help and exit SEE ALSO
quickplot(1) COPYRIGHT
Copyright (C) 1998-2011 Lance Arsenault Quickplot is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Quickplot is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Quickplot. If not, see <http://www.gnu.org/licenses/>. AUTHOR
Lance Arsenault <lanceman@users.sourceforge.net> Send bug reports or comments to the above address. For more information, see the Quickplot homepage at <http://quickplot.sourceforge.net/>. Quickplot Version 0.10.3: 31 Jan 2012 03:27:29 UTC QUICKPLOT_SHELL(1)