10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to achieve the follwoinig with no luck.
Find the directories that are greater than 50GB in size and pick the owner of the directory as I would like to send an alert notification.
du -sh * | sort -rh
139G Dir_1
84G Dir_2
15G Dir_3
ls -l Dir_1
drwx------ 2... (3 Replies)
Discussion started by: 308002184
3 Replies
2. Shell Programming and Scripting
Here's my code:
awk -F '' 'NR==FNR {
if (/time/ && $5>10)
A=$2" "$3":"$4":"($5-01)
else if (/time/ && $5<01)
A=$2" "$3":"$4-01":"(59-$5)
else if (/time/ && $5<=10)
A=$2" "$3":"$4":0"($5-01)
else if (/close/) {
B=0
n1=n2;
... (2 Replies)
Discussion started by: klane
2 Replies
3. Shell Programming and Scripting
I want to create an array which can store the strings from the user input in shell script .
example :-
I want to store the 5 fruits name in a single array which the user provides . (1 Reply)
Discussion started by: Pkast
1 Replies
4. Shell Programming and Scripting
I am reading a value from a file and want to store the value in a dynamic array as i don't know the number of occurrences of the value in that file.
How can i do that and then later fetch that value from array (25 Replies)
Discussion started by: Prachi Gupta
25 Replies
5. Shell Programming and Scripting
Hi,
How to store the values in array from output result,
EG:
I have the result like this,
ps, google, 1.txt, 1
sam, google, 2.txt, 2
These are the four values followed by comma in two sets. I need to store these values set by set. One set contains four values followed by comma.
... (2 Replies)
Discussion started by: KarthikPS
2 Replies
6. Shell Programming and Scripting
Dear All,
I have been trying to do a simple task of extracting 2 fields from the file (3 rows) and store it in an array variable. I tried with:
#! /bin/bash
ch=`cut -f10 tmp.txt`
counter=0
for p in $pid
do
c=${ch}
echo "$c ..$counter"
counter=$((counter+1))... (2 Replies)
Discussion started by: ezhil01
2 Replies
7. Shell Programming and Scripting
Hi all.
Well, I have the next code:
I need to make an array with the values I have in the bucle, but just don't get it...
Question is, how can I store in an array that values, and how can I display them with echo? (8 Replies)
Discussion started by: crcbad
8 Replies
8. Shell Programming and Scripting
I want to store contents of command
dir in array of variables
For eg: dir contents are
command d2 demovi~ file inven java new untitled folder
d1 demovi er1 filename inven~ myfiles ubuntu desktop xmms
-----------------------------------
I... (3 Replies)
Discussion started by: netresearch
3 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I do have a file and the contents are as follws:
10
20
30
40
50
Now I want to store those values into an array. How can be done this ?? (3 Replies)
Discussion started by: risshanth
3 Replies
10. Shell Programming and Scripting
I need to split a long varible which is a whole line read from a file into fields and store them in an array, the fields are delimited by pipe and a field may contain white spaces.
I tried the following concept test and it has problem with field 5 which contain a space, appearently so because... (3 Replies)
Discussion started by: gratus
3 Replies