10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have written a (bash) function which generates multiple files say file1 file2 file3
now I want to reduce the generation of these three files i.e. store the output of three files in variables, and generate the same results, in-order to avoid multiple creation of files
how is that... (7 Replies)
Discussion started by: sam@sam
7 Replies
2. Shell Programming and Scripting
Hey guyz.
Here is my sample input file following by first part of my code:
* A B C D E
reg1 1 0 1 1 0
reg2 0 1 0 0 1
reg3 1 0 0 1 0
reg4 0 0 1 0 1
reg5 1 1 0 0 1
use strict;
use warnings;
open (IN, "test_input.txt") or die ("Can't open file.txt: $!\n");
my $line = <IN>; ... (2 Replies)
Discussion started by: @man
2 Replies
3. 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
4. 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
5. Shell Programming and Scripting
Hi I want to write a script such that when executed, it will store all input as different variable, for eg
./store.sh name1 name2 name3 name4
will result in
$1=name1
$2=name2
$3=name3
etc
How do I do that?
Thanks. (1 Reply)
Discussion started by: piynik
1 Replies
6. Shell Programming and Scripting
Hi
I want to write a script which store all the parameters passed to the script into an array.
Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD.
I want to know how can I... (3 Replies)
Discussion started by: dgmm
3 Replies
7. Shell Programming and Scripting
Guys anyone know how i can store fields into multiple variables in one go?
I'm wanting to grab the disk id's from format into disk1 and disk2
Below is what i want to work but i know it doesnt :-
: | format | awk '/^(\ +)/ {print $2}' | read disk1 disk2
The below does work...but i don't... (5 Replies)
Discussion started by: lavascript
5 Replies
8. 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
9. 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
10. 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