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)
I am definitely not an expert with awk, and I want to reformat a text file like the following. This is probably a very easy one for an expert out there. I would like to keep the lines in the same order, but move the heading to only be listed once above the lines.
This is what the text file... (7 Replies)
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 have below file listing
] ls -1 *.txt
MISTradesReport_141105_d130240_VOLCKER_EMEA_LOANIQ_FEED_2013-12-24.txt
MISTradesReport_141106_d130240_VOLCKER_NA_LOANIQ_FEED_2013-12-24.txt
MISTradesReport_141107_d130240_VOLCKER_EMEA_CDS_CRDI_FEED_2013-12-24.txt... (4 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)
The below awk improved bu @MadeInGermany, works great as long as the input file has data in it in the below format:
input
chrX 25031028 25031925 chrX:25031028-25031925 ARX 631 18
chrX 25031028 25031925 chrX:25031028-25031925 ARX 632 14... (3 Replies)