10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi everybody
I wanna store some values that r in a .txt file in some arrays
for example I have:
32782 28
32783 02
32784 01
32785 29
32786 25
32787 25
32788 00
32789 25
32790 02
32791 29
32792 23
32793 01
32794 28
and I need to save the first... (4 Replies)
Discussion started by: Behrouzx77
4 Replies
2. Shell Programming and Scripting
I want to pass an array of variables to be inserted by awk in the 2nd column of a file.
Empl No. Employee Age
1000000 22
1100000 24
1200000 26
Now, I want to pass an array having three different ages which need to replace the... (7 Replies)
Discussion started by: Nishi_Licious
7 Replies
3. 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
4. Shell Programming and Scripting
Hello Guys,
I am trying to store output of command to an array and then want to print, but it showing an error that "bad substitution". I am not getting why it's happening.
Can anyone help me?
#!/usr/bin/sh
hr=0
min=0
i=1
last $1 | grep -w `date "+%b"` | grep -v '\(0:.*\)' | grep -vw sshd... (8 Replies)
Discussion started by: kasparov
8 Replies
5. Shell Programming and Scripting
Hi to all,
I have this input:
<group>
<x "2">Group D</x>
<x "3">Group B</x>
<x "1">Group A</x>
</group>
<group>
<x "1">Group E</x>
<x "0">Group B</x>
<x "1">Group C</x>
</group>
<group> ... (11 Replies)
Discussion started by: Ophiuchus
11 Replies
6. Shell Programming and Scripting
So, here's a scenario that requires the same logic as what I'm working on: Suppose that you have a directory containing files named after users. For awk's purposes, the filename is a single field-- something parse-friendly, like john_smith. Now, let's say that I'd like to populate an array in... (2 Replies)
Discussion started by: treesloth
2 Replies
7. Shell Programming and Scripting
Hi,
I need to pass a run time input to unix script which tracks the list of files in the directory under certain pattern. The files which are matched to the given pattern then need to be stored in the array. Requesint you all to please suggest me the solution.
I gave the below command in the... (13 Replies)
Discussion started by: Sekar1
13 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. Shell Programming and Scripting
Example output:
/tmp/generatelines.sh
line1
line2
line3
line4
I want each output line assigned to its own variable, ie:
"line1" --> $a
"line2" --> $b
"line3" --> $c
"line4" --> $d
Is this possible without writing to a temporary file?
Thanks (4 Replies)
Discussion started by: ksheller
4 Replies
10. Shell Programming and Scripting
Using Cygwin PDksh - But also have tested it on Linux with same results
----
I have a script that invokes a program/script and returns a string of data (1234 "12 34 56" 6789) and using "set -A" inserting it into an array.
script code snipit >>
get_array=$(php... (2 Replies)
Discussion started by: carlos25
2 Replies