10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi experts,
I am using KSH and I am need to display file with number in front of file names and user can select it by entering the number.
I am trying to use following command to display list with numbers. but I do not know how to capture number and identify what file it is to be used for... (5 Replies)
Discussion started by: mysocks
5 Replies
2. Shell Programming and Scripting
Hello ,
I have a file : RestartSession.txt with the below contents :
Backup p203pcrw01_OS_Weekly Failed full 10/11/2015 10:00:07 PM 1444572007 10/11/2015 10:26:23 PM 1444573583 0:00 0:26 18.76 1 08 0 0 0 2 2 180668 ... (4 Replies)
Discussion started by: rahul2662
4 Replies
3. Shell Programming and Scripting
Hi all,
I have a list of numbers. I need an awk command to find out the numbers of elements (number of numbers, sort to speak), the average value the min and max value. Reading the list only once, with awk.
Any ideas?
Thanks! (5 Replies)
Discussion started by: black_fender
5 Replies
4. UNIX for Dummies Questions & Answers
Hello friends!!
I have a question regarding the use of ls in unix. I have a folder with files:
t1.txt
t2.txt
t3.txt
t4.txt
...
t10.txt
When I make an ls I always get:
t10.txt
t1.txt
t2.txt
t3.txt
..
t9.txt (2 Replies)
Discussion started by: SaktiPhoenix
2 Replies
5. Shell Programming and Scripting
~]#netstat -vatn | grep LISTEN
tcp 0 0 0.0.0.0:34895 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN ... (7 Replies)
Discussion started by: linuxadmin
7 Replies
6. Shell Programming and Scripting
Hello everyone,
can anyone let me know if there is a way to get the count of elements in a word list that I use for a for loop in the way:
for single_result in $results ; do .......
I know I can increment a counter in my for loop, but would there be a way to know the total number of elements in... (4 Replies)
Discussion started by: gio001
4 Replies
7. Shell Programming and Scripting
I try to get a number of elements in an array, using dynamic array name.
I need the array name to be dynamic.
The array name is constructed as 'inf_ln_$nmb', where $nmb is a file line number
So, say I have the arr 'inf_ln_4':
> for (( el=0; el<${#inf_ln_4}; el++ )); do
> echo "$el:... (1 Reply)
Discussion started by: alex_5161
1 Replies
8. Shell Programming and Scripting
Hi,
I face difficulty where the number which I grep before I would like to use it as number to grep again in another file.
For example in file 1, I extract the second field and assign to variable "char" in a while loop. And then, I grep again this char to get i and j.
char=`echo "${LINE}"|... (17 Replies)
Discussion started by: ahjiefreak
17 Replies
9. AIX
Hello,
How can I list mirrored elements, such as PV, VG or LV? (and others if applicable). On AIX 4.3.3 and 5.3.0.
I tried the commands:
lscfg|grep hd
lspv
lsvg
lsvg -l (of each vg)
lslv (and some options)
But could not find what am I looking for. I saw a "number of copies", but I am... (4 Replies)
Discussion started by: cactux
4 Replies
10. Shell Programming and Scripting
Hi,
I wrote a shell program and I need to only accept a list of numbers from 01 to 24 in my argument 1 ($1) before the program can continue.
Does anyone know a better way to do it beside use the case command with 24 lines of condition?
Thanks in advance! (6 Replies)
Discussion started by: whatisthis
6 Replies