03-24-2018
Hi RudiC,
I don't have unix terminal at the moment so I have not tested it, I can do that on Monday when I reach home. I was curious to know if what I my scripts would work. Can you identify the errors you can see ( is that ; after the for statement in first for loop)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
say
D45H
E67H
G779K
F8888U
T66Y
Y333U
output shud be like
45
67
779
8888
66
333 (5 Replies)
Discussion started by: cdfd123
5 Replies
2. Shell Programming and Scripting
Hi,
If I use this command netstat | grep "1268" it shows me all IP addresses connected via port 1268, which is half of what I want.
I would like to be able to then map these against a PID on the system, and also thereby get the userid.
I have done a couple of days google bashing but... (3 Replies)
Discussion started by: gcraill
3 Replies
3. UNIX for Dummies Questions & Answers
Hey all,
I'm looking for a command that will search a directory (and all subdirectories) and give me a file count for the number of files that contain specific characters within its filename. e.g. I want to find the number of files that contain "-a.jpg" in their name.
All the searching I've... (6 Replies)
Discussion started by: murphysm
6 Replies
4. Shell Programming and Scripting
How can I print number pyramid with for loop(not while only for) in unix like:
1
22
333
4444
55555
---------- Post updated at 09:09 AM ---------- Previous update was at 09:07 AM ----------
I forgot it is in ksh...I wrote a script in bash but it is nt wrkng in ksh...
bash script... (12 Replies)
Discussion started by: joshilalit2004
12 Replies
5. Shell Programming and Scripting
I have a sorted file like:
Apple 3
Apple 5
Apple 8
Banana 2
Banana 3
Grape 31
Orange 7
Orange 13
I'd like to search $1 and if $1 is not the same as $1 in the previous row print that row and print the number of times $1 was found.
so the output would look like:
Apple 8 3
Banana... (2 Replies)
Discussion started by: dcfargo
2 Replies
6. UNIX for Dummies Questions & Answers
Ok, so I know there's a way to do this, but I've been trying to find out all afternoon with no luck. I think it should print out something like this:
1 bin
2 daemon
6 duo
Where the numbers on the left are the number of processes being run by the user whose name is listed on the right. Is... (4 Replies)
Discussion started by: Duo11
4 Replies
7. Shell Programming and Scripting
Hi,
I have a file (movies.sh), this file contains list of movies such as
I want to redirect the movies from movies.sh to file_to_process to allow me process the file with out losing anything.
I have tried
Movies.sh >> file_to_process
But I want to add the row number to the data... (2 Replies)
Discussion started by: INHF
2 Replies
8. Shell Programming and Scripting
Hi
I have a file with number of entries
name 1 123
name 1 345
name 1 65346
name2 3243
name2 24234
name 2 234234
so on .........
how to count total number of entries for name 1 and name2...and so on Please guide. (1 Reply)
Discussion started by: manigrover
1 Replies
9. Shell Programming and Scripting
I have some files as shown below
GLL ALM 654-656 654 656
SEM LYG 655-657 655 657
SEM LYG 655-657 655 657
ALM LEG 656-658 656 658
ALM LEG 656-658 656 658
ALM LEG 656-658 656 658
LEG LEG 658-660 658 660
LEG LEG 658-660 658 660 The value of GLL is... (5 Replies)
Discussion started by: arch
5 Replies
10. UNIX for Dummies Questions & Answers
I have a folder named test/ and under that I have multiple directories and in each of the directory I have multiple log files. I want to know how many files exists under each sub directory.
test
|--quanrantine
|--logfile1
|--logfile2
|--spooling
|--logfile1
... (4 Replies)
Discussion started by: ravikirankethe
4 Replies
dappprof(1m) USER COMMANDS dappprof(1m)
NAME
dappprof - profile user and lib function usage. Uses DTrace.
SYNOPSIS
dappprof [-acehoTU] [-u lib] { -p PID | command }
DESCRIPTION
dappprof prints details on user and library call times for processes as a summary style aggragation. By default the user fuctions are
traced, options can be used to trace library activity. Output can include function counts, elapsed times and on cpu times.
The elapsed times are interesting, to help identify functions that take some time to complete (during which the process may have slept).
CPU time helps us identify syscalls that are consuming CPU cycles to run.
Since this uses DTrace, only users with root privileges can run this command.
OPTIONS
-a print all data
-c print function counts
-e print elapsed times, ns
-o print CPU times, ns
-T print totals
-p PID examine this PID
-u lib trace this library instead
-U trace all library and user functions
EXAMPLES
run and examine the "df -h" command,
# dappprof df -h
print elapsed times, on-cpu times and counts for "df -h",
# dappprof -ceo df -h
print elapsed times for PID 1871,
# dappprof -p 1871
print all data for PID 1871,
# dappprof -ap 1871
FIELDS
CALL Function call name
ELAPSED
Total elapsed time, nanoseconds
CPU Total on-cpu time, nanoseconds
COUNT Number of occurrences
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
dappprof will sample until Ctrl-C is hit.
AUTHOR
Brendan Gregg [Sydney, Australia]
SEE ALSO
dapptrace(1M), dtrace(1M), apptrace(1)
version 1.10 May 14, 2005 dappprof(1m)