In the bash below I am trying to loop through all the R1.gz in a directory (always 1), store them in ARRAY, and cut them before the second _. That is being done but I can't seem to print then one a single line seperated by a space. Is the below the best way or is there a better solution? Thank you .
Hello,
I have two files that I need to compare and print out the line from file2 that has the first 6 fields matching the first 6 fields in file1. Complicating this are the following restrictions
1. file1 is only a few thousand lines at most and file2 is greater than 2 million
2. I need to... (7 Replies)
Hello,
I have 800 or so files with 3 columns each and >10000 lines each.
For each file and each line I would like to print the maximum column number for each line. Then I would like to 'paste' each of these files together (column-wise) so that the file with expression in label '_1' is the... (6 Replies)
I am trying to loop through folders and extract the name of the lowest level subfolder
I was running the script below, it returns
/bb/bin/prd/newyork
/bb/bin/prd/london
/bb/bin/prd/tokyo
I really want
newyork
london
tokyo
I couldn't find a standard variable for the lowest level... (1 Reply)
Hi ,
i want to print the output in line by line
while read LINE
do
echo $LINE | grep UCM | egrep '(Shutdown|Unavailable)'
echo $LINE | grep SRBr | egrep '(Shutdown|Unavailable)'
echo $LINE | grep SRP| egrep '(Shutdown|Unavailable)'
echo $LINE | grep OM | grep JMS|... (7 Replies)
Hi,
I am trying to print copy percentage completion dynamically by using the script below,
#!/bin/bash
dest_size=0
orig_size=`du -sk $sourcefile | awk '{print $1}'`
while ; do
dest_size=`du -sk $destfile | awk '{print $1}'`
coyp_percentage=`echo "scale=2; $dest_size*100/$orig_size"... (4 Replies)
Hi All,
i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field.
i am using centos 7 Operating system.
want to read below file.
# cat /tmp/d5
NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Currently using below script but echo it print the output in two line.
Input file all-vm-final-2.txt
CEALA08893 SDDC_SCUN DS_SIO_Workload_SAPUI_UAT_01 4
CEALA09546 SDDC_SCUN DS-SIO-PD5_Workload_UAT_SP1_Flash_07 4
CEALA09702 SDDC_SCUN DS-VSAN-RMP-WORKLOAD01 4
DEALA08762 SDDC_LDC... (3 Replies)
Discussion started by: ranjancom2000
3 Replies
LEARN ABOUT MOJAVE
rwsnoop
rwsnoop(1m) USER COMMANDS rwsnoop(1m)NAME
rwsnoop - snoop read/write events. Uses DTrace.
SYNOPSIS
rwsnoop [-jPtvZ] [-n name] [-p PID]
DESCRIPTION
This is measuring reads and writes at the application level. This matches the syscalls read, write, pread and pwrite.
Since this uses DTrace, only users with root privileges can run this command.
OPTIONS -j print project ID
-P print parent process ID
-t print timestamp, us
-v print time, string
-Z print zone ID
-n name
process name to track
-p PID PID to track
EXAMPLES
Default output,
# rwsnoop
Print zone ID,
# rwsnoop -.Monitor processes named "bash", # rwsnoop -n bash
FIELDS
TIME timestamp, us
TIMESTR
time, string
ZONE zone ID
PROJ project ID
UID user ID
PID process ID
PPID parent process ID
CMD command name for the process
D direction, Read or Write
BYTES total bytes during sample
FILE filename, if file based. Reads and writes that are not file based, for example with sockets, will print "<unknown>" as the file-
name.
DOCUMENTATION
See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with ver-
bose descriptions explaining the output.
EXIT
rwsnoop will run forever until Ctrl-C is hit.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO rwtop(1M), dtrace(1M)version 0.70 Jul 24, 2005 rwsnoop(1m)