10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a total of 100 files (variable size of each file) with total size of 328950 bytes. I want to merge those 100 files into 4 files with each size be close to equal size i.e (328950/4 ~= 82238) but do not want to break any file. Any unix sheel script help will be really helpful. (18 Replies)
Discussion started by: George1234
18 Replies
2. Shell Programming and Scripting
I am creating (with help) my own version of a calculator script that simply merges 2 arrays ( ${a}${b}${a}${b}... etc )
#!/bin/bash
echo "Enter the integers you would like to calculate"
read -a nums
echo "You entered ${#nums} integers"
let batch="${#nums}-1"
echo "Enter how you want to... (2 Replies)
Discussion started by: pbmitch
2 Replies
3. Shell Programming and Scripting
I am trying to create a script that combines 2 arrays:
#!/bin/bash
read -a unix #(a c e g)
read -a test #(b d f)
#now I want to merge ${unix} with ${test}, one after another such that the result would be: (abcdefg)
#I've tried quite a few options and can't seem to make it work (5 Replies)
Discussion started by: pbmitch
5 Replies
4. Shell Programming and Scripting
Hi,
I have searched the forums for a solution but I haven't found a perfect answer, and I'm a bit of a novice, so I hope someone can help:
I have 2 files:
file1:
Chr1 139311 1/1:37,3,0:19
Chr1 139350 1/1:67,6,0:19
Chr1 139404 1/1:0,0,0:7
Chr1 152655 0/1:0,0,0:3
Chr1 152718... (2 Replies)
Discussion started by: ljk
2 Replies
5. Shell Programming and Scripting
Hi,
I have two files and i want to merge it like,
file1.txt
---------
abc
cde
efg
file2.txt
-------
111
222
333
Output file should be,
--------------
abc
111 (2 Replies)
Discussion started by: rbalaj16
2 Replies
6. Programming
if i declare both but don't input any variables what values will the int array and file pointer array have on default, and if i want to reset any of the elements of both arrays to default, should i just set it to 0 or NULL or what? (1 Reply)
Discussion started by: omega666
1 Replies
7. Shell Programming and Scripting
I have 2 arrays,
@array1 contains records in the format
1|_|X|_|ssd|_|
4|_|H|_|hbd|_|
9|_|Y|_|u8gjdfg|_|
@array2 contains records in the format
X|_|asdf|_|
Y|_|qwer|_|
A|_|9kdkf|_|
@array3 should contain records in the PLz
X|_|ssd|_|asdf|_|
Y|_|hdb|_|qwer|_|
PLZ dont use... (2 Replies)
Discussion started by: centurion_13
2 Replies
8. Shell Programming and Scripting
Hi all,
I have 2 files. I want to merge a portion or column in file 2 into file 1.
file 1 - not tab or space delimited
B_1 gihgjfhdj| hgfkddlldjljldjlddl
B_2 gihgjddshjgfhs| hgfkddlldjljldjlddl
B_3 gihgjfhdj| hgfkddlldjljldjlddlhgjdhdhjdhjhdjhdjhgdj
file2 -... (7 Replies)
Discussion started by: Lucky Ali
7 Replies
9. Web Development
PHP question...
I have an SQL query that's pulled back user IDs as a set of columns. Rather than IDs, I want to use their names.
So I have an array of columns $col with values 1,7,3,12 etc and I've got an array $person with values "Fred", "Bert", "Tom" etc
So what I want to do is display the... (3 Replies)
Discussion started by: JerryHone
3 Replies
10. Shell Programming and Scripting
Hi Gurus,
I need a help in merging the files.
I have nearly 7 files and the files will have time stamp in it.
I need to merger these files condition is it is not necessary that all the 7 files has to be there.
suppose if i have only 3 files availabe out of these 7 then i need to merge... (3 Replies)
Discussion started by: kumarc
3 Replies