I often use "ps -ef" command to list all running processes. Now i want to customize the output to show only 2 parts: CMD and UID as below:
/bin/bash /usr/bin/run-parts /etc/cron.weekly root
/usr/sbin/httpd apache
/usr/sbin/httpd apache
/usr/sbin/httpd apache
I use ps -ef | awk '{print $8"... (3 Replies)
Hi,
I am writing just to share my appreciation for help I have received from this site in the past.
In a previous post Split File by Data Group I received a lot of help with a troublesome awk script to reformat some complicated data blocks. What I learned really came in hand recently when I... (1 Reply)
Hi colleagues,
I have the followind script.
db2 -x "select substr(TBSPACE,1,20) TABLESPACE from syscat.tables where tabschema = 'SCHEMA' and tabname like '%XXXX' group by TBSPACE order by TBSPACE" | awk '{print $1}' | while read tablespace
do
db2 "list tablespaces show detail" |grep -p -w... (5 Replies)
We have the following output:
server1_J00_data_20120711122243
server1_J00_igs_20120711122243
server1_J00_j2ee_20120711122243
server1_J00_sec_20120711122243
server1_J00_data_20120711131819
server1_J00_igs_20120711131819
server1_J00_j2ee_20120711131819
server2_J00_data_20120711122245... (10 Replies)
I need a Shell script which take two inputs which are
1) main directory where it has to search and
2) pattern to search within main directory all files (.c and .h files)
It has to print number of pattern found in main directory & each sub directory.
main dir --> Total pattern found = 5
|... (3 Replies)
Hi there. I need to reformat a large file. Here is a sample of the file.
NETIK0102_UCS_Boot_a,NETIK0102_UCS_Boot_b
5200 2438 70G
5200 2439 70G
NETIK0102_UCS_HBA0_a,NETIK0102_UCS_HBA1_b,NETIK0102_UCS_HBA2_a,NETIK0102_UCS_HBA3_b
2673 19D7 55G
2673 19C0 30G
2673 19F5 120G... (5 Replies)
I need to rearrange the output but i am unable to arrange it to match the format. In the output i need NAME=\"To in the column .
Bash:
#!/bin/bash
cd /cygdrive/c/output/a
cat *.txt > output.txt
i=/cygdrive/c/output/a/output.csv
#echo "NE_Name, Source, Destination, OSPF_AREA_ID"... (4 Replies)
Hello,
I have a file which has the below contents :
VG_name LV_name LV_size in MB LV_option LV_mountpoint owner group y
testdg rahul2lv 10 "-A y -L" /home/abc2 ... (6 Replies)
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
LEARN ABOUT CENTOS
ri
RI(1) Ruby Programmers Reference Guide RI(1)NAME
ri -- Ruby API reference front end
SYNOPSIS
ri [-Ti] [-d directory] [-f format] [--list-doc-dirs] [--no-standard-docs] [--[no-]{system|site|gems|home}] [--[no-]use-cache]
[--width=width] [target ...]
DESCRIPTION
ri is a CLI front end for the Ruby API reference. You can search and read API reference for classes and methods with ri.
ri is a part of Ruby.
target can be one of the following forms:
Class for classes
Class::method for class methods
Class#method for instance methods
Class.method for both class and instance methods
method for both class and instance methods
All class names may be abbreviated to their minimum unambiguous form. If a name is ambiguous, all valid options will be listed.
For example:
ri Fil
ri File
ri File.new
ri zip
Note that shell quoting may be required for method names containing punctuation:
ri 'Array.[]'
ri compact
OPTIONS --version Prints the version of ri.
-T
--no-pager Send output directly to stdout, rather than to a pager.
-d directory
--doc-dir=directory
List of directories from which to source documentation in addition to the standard directories. May be repeated.
-f FORMAT
--fmt FORMAT
--format=FORMAT
Format to use when displaying output:
ansi, bs, html, plain, simple
Use 'bs' (backspace) with most pager programs. To use ANSI, either disable the pager or tell the pager to allow control char-
acters.
-i
--interactive This makes ri go into interactive mode.
When ri is in interactive mode it will allow the user to disambiguate lists of methods in case multiple methods match against
a method search string. It also will allow the user to enter in a method name (with auto-completion, if readline is sup-
ported) when viewing a class.
--list-doc-dirs
List the directories from which ri will source documentation on stdout and exit.
--no-standard-docs
Do not include documentation from the Ruby standard library, site_lib, installed gems, or ~/.rdoc.
Equivalent to specifying the options --no-system, --no-site, --no-gems, and --no-home.
--[no-]system Include documentation from Ruby's standard library. Defaults to true.
--[no-]site Include documentation from libraries installed in site_lib. Defaults to true.
--[no-]gems Include documentation from RubyGems. Defaults to true.
--[no-]home Include documentation stored in ~/.rdoc. Defaults to true.
--[no-]use-cache
Whether or not to use ri's cache. True by default.
-w width
--width=width Set the width of the output.
ENVIRONMENT
RI Additional options.
PAGER Used as the name of pager program for displaying.
HOME
USERPROFILE
HOMEPATH Path to user's home directory.
FILES
~/.ri Caches recently referenced documents here.
~/.rdoc Searches user-wide documents here.
SEE ALSO ruby(1)rdoc(1)gem(1)REPORTING BUGS
Security vulnerabilities should be reported via an email to <security@ruby-lang.org>. Reported problems will be published after being fixed.
And you can report other bugs and feature requests via the Ruby Issue Tracking System (http://bugs.ruby-lang.org). Do not report security
vulnerabilities via the system because it publishes the vulnerabilities immediately.
AUTHORS
Written by Dave Thomas <dave@pragmaticprogrammer.com>
UNIX November 7, 2012 UNIX