10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I have two files with me file1.txt and file2.txt
file1.txt has:
333
222
111
file2.txt has
ccc
bbb
aaa
ccc is related to 333 only, bbb is related to 222 only and aaa is related to 111 only.
I have to get the values from each of the file and pass them in the URL... (3 Replies)
Discussion started by: ankur328
3 Replies
2. Shell Programming and Scripting
Hi,
I am writing in a file through cat command. This file will contain the path of file along with filename. e.g. /home/user/folder1/folder2/filename.txt
There might be very large number of this path in same file like say 140
when I try to run while command:
while read -r file
do
//command... (8 Replies)
Discussion started by: Pulkit Lall
8 Replies
3. Shell Programming and Scripting
Hi,
I am not so familiar with bash scripting and would appreciate your help here.
I have a text file 'input.txt' like this:
2 3 4
5 6 7
8 9 10
I want to store each column in an array like this
a ={2 5 8}, b={3 6 9}, c={4 7 10}
so that i can access any element, e.g b=6 for the later use. (1 Reply)
Discussion started by: Asif Siddique
1 Replies
4. Shell Programming and Scripting
Hi Guys,
I have file A.txt
PP97
PP66
PP87
PP66
PP47
PP57
PP44
PP20
PP66
PP16
PP13
PP51
PP68
PP70
PP75
PP30 (2 Replies)
Discussion started by: asavaliya
2 Replies
5. Shell Programming and Scripting
Hi All,
I need small help on for loop syntax in C shell.
How can we read the values from a file (line by line) through C shell loop.
For Ex:
$Cat file1
data1
data2
data3
data4
$
I have to print those values in a variable and have to perform some steps...
Can anyone help on... (2 Replies)
Discussion started by: raghu.iv85
2 Replies
6. Shell Programming and Scripting
Hi,
I am on HP-UX and K shell.
When I am using while/for loop for reading a file. It is working fine but not reading tabs:
Suppose, if the line is: ; ;COMP; ; ; ;
then loop is reading as
; ;COMP; ;... (5 Replies)
Discussion started by: ezee
5 Replies
7. AIX
Hi,
I am building a script to grep for a string in all the files from a folder and display the results.
I am reading the files one by one by placing the names in other file using while loop
my code is as below
while read inp
do
chk=`grep -c "$str" $pth/$inp`
... (2 Replies)
Discussion started by: sekhar gajjala
2 Replies
8. Programming
Hi,
I have a base class and derived a class from the base class, i want to print & read the data for the object created for the derived class,so i have overloaded both the << and >> operators and also have done the foward declaration.
Below is the code snippet,
#include <iostream>
class... (3 Replies)
Discussion started by: ennstate
3 Replies
9. UNIX for Dummies Questions & Answers
To make it clearer:
I have a file, List.txt
List.txt contains: (these are actually splitted files w/c I got from ls command and dump them to the List.txt file)
SAMPLEa
SAMPLEb
SAMPLEc
SAMPLEd
SAMPLEe
SAMPLEf
.
.
.
.
.
And I want to rename these files to have a .dat extension.... (3 Replies)
Discussion started by: JohnBalayo
3 Replies
10. Shell Programming and Scripting
Hi All,
I am having trouble through, I am reading the input from tab delimited file containing several records,
e.g.
line1 field1 field2 field3 so on..
line2 field1 field2 field3 so on..
..
..
on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies