10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
I have this script that will monitor filesystems and send me e-amil alerts.
#! /bin/ksh
DIST_LIST=monitor@...com
WORKDIR=/home/monitor
WARNLEVEL=90
MAIL_SUBJ="filesystems monitor on "$(hostname)
... (3 Replies)
Discussion started by: danielshell
3 Replies
2. Shell Programming and Scripting
Hello friends,I am new to Unix programming.
how do I achieve the following in Unix shell script (I am running ksh on AIX)
extract the number from name of file?
My file format is like "LongFileName-1234.020614-221030.txt"
now I want to extract value which is between (-) hyphen and (.) dot... (4 Replies)
Discussion started by: f150
4 Replies
3. Shell Programming and Scripting
Hello
I have an file with this content
--------------------------------------------
timer
one
timer
two
timer
three
timer
four
timer
five
timer
six
timer
seven
-------------------------------------------
And I want the following output.... (4 Replies)
Discussion started by: thailand
4 Replies
4. Shell Programming and Scripting
Hi,
i've a string
/u/user/DTE/T_LOGS/20110622_011532_TEST_11_HD_120/HD/TESi T_11_HD_120/hd-12
i need to get string, like
/u/user/DTE/T_LOGS/20110622_011532_TEST_11_HD_120/HD
the words from HD should get deleted, i need only a string till HD, i dont want to use any built in... (4 Replies)
Discussion started by: asak
4 Replies
5. Shell Programming and Scripting
Hi all,
Looking for suggestions on a better way to sum numbers in a key value pair formated file. What I have works but seems really clunky to me. Any suggestions would be greatly appreciated.
cat test.txt | perl -ne 'm/(M=)(\d+\.?\d?\d?)/ && print "$2\n"' | awk '{ sum+=$1} END {printf... (7 Replies)
Discussion started by: cgol
7 Replies
6. UNIX for Dummies Questions & Answers
I need to extract all the p-value numbers and the rho numbers from a .txt file and write them as coma separated values in a new file. Ideally I would get two files in the end, one for p- values and one for rho. Any suggestions? I appreciate your help!!!
The .txt file looks essentially like this... (5 Replies)
Discussion started by: eggali
5 Replies
7. Shell Programming and Scripting
Hi,
I was trying to extract the last word with all numbers using awk. like the below example. I am looking for a pattern using awk.
desired result: (13 Replies)
Discussion started by: hitmansilentass
13 Replies
8. Shell Programming and Scripting
Hi,
I would want to fetch all the numbers after a word the number of characters could very. how can I do that?
below is the example of the data and the expected output
sample data
03 xxxx occurs 1090 times.
04 aslkja occurs 10 times.
I would want to fetch 10 & 1090 separately. (13 Replies)
Discussion started by: ahmedwaseem2000
13 Replies
9. Shell Programming and Scripting
Hey all,
I ran some simulations, of which the output is 100s of files. I've used grep to extract the vital information needed from the files. This has made my task somewhat easier. But I still need to perform some mathematical calculations (average and geometrical average) on the results of the... (9 Replies)
Discussion started by: slackjack
9 Replies
10. Shell Programming and Scripting
Hi all,
Please some help over here. I have a Sales.txt file containing info in blocks for
every sold product in the pattern showed below (only for 2 products).
NEW BLOCK
SALE DATA
PRODUCT SERIAL
79833269999 146701011945004
.Some other data
.Some... (17 Replies)
Discussion started by: cgkmal
17 Replies