10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have two files with values in both.
File1:
cat 2 3
dog 4 5
elephant 6 7
camel 2 3
File2:
----+--gkf;ajf=
---+----
+----- cat -------=----+ 3 | 4 ----- dog ------++-- 5 | 9 ----++-- elephant |
5 | 7
---++ camel ------ ++++_---- || 8 | 9
I want the final file as:
cat 4... (1 Reply)
Discussion started by: npatwardhan
1 Replies
2. Shell Programming and Scripting
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
Discussion started by: asandy1234
9 Replies
3. Shell Programming and Scripting
I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables.
I need to read this file which is an input to my script
Config.txt
file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies
4. Shell Programming and Scripting
Hi Everyone !
I have two files with the same configuration
and I want to multiply corresponding values and write the result in a file.
Let say 2 header lines and then lines of values (with not constant number of columns):
more file1.txt -->
BLABLABLA
BLABLABLA
1 2 3 4
1 2 3
1 2
1... (7 Replies)
Discussion started by: Youm
7 Replies
5. Shell Programming and Scripting
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2.
- I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies
6. UNIX for Dummies Questions & Answers
Basically, my problem is to multiply my file to $c times. Is there a faster way to do this?
c=100
while ]; do
cat file1.txt
((c=$c-1))
done > file2.txt
I appreciate your help! (6 Replies)
Discussion started by: chstr_14
6 Replies
7. Shell Programming and Scripting
Hi all,
I have 2 files. One contains only 1 column and other one contains 2 columns, let say 1_col.txt and 2_col.txt respectively. Here, I will try to explain with an example.
Input files :
1_col.txt 2_col.txt
a a b
x a c
p ... (5 Replies)
Discussion started by: AshwaniSharma09
5 Replies
8. Shell Programming and Scripting
Hi
I have 2 files:-
1. List of files which consists of names of some output files.
2. A delimited file; delimted by "|"
I want to replace the value of the $23 (23rd column) in the delimited file with name in the first file. It is always position to position. Meaning first row of the first... (5 Replies)
Discussion started by: pparthiv
5 Replies
9. Shell Programming and Scripting
All I want to do is find 5!.
read num
num={1..5}
while
do
f=
done
echo f
Error Msg. line 5: ${1..5} bad substitution
line 6: integer expression expected
Line 5 is the num=...
Line 6 is the "while" statement
I am new at this, and I am really, really trying.
Please... (14 Replies)
Discussion started by: Ccccc
14 Replies
10. Shell Programming and Scripting
I need to multiply the value of a variable and then store it in another variable. I have EXPHOURINSEC=$(($EXPDATEHOUR * 3600)) but i get an error saying the * is unexpected.
Im using ksh (4 Replies)
Discussion started by: fwabbly
4 Replies