9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a text file as belows, it includes 2 columns, 1st is the column name, 2nd is the file_name
data_file.txt
column_name file_name
col1 file1
col2 file2
col3 file1
col4 file1
col5 file2
now, i would like to... (4 Replies)
Discussion started by: tester111
4 Replies
2. UNIX for Dummies Questions & Answers
Hi there,
I am trying to read the content such that if there is 'adsmsext.dll', it will read everything from line one until it reads line 6 with 'C:' then it will terminate at line 5.
1. C:\WINDOWS\system32\adsmsext.dll NT AUTHORITY\Authenticated Users:R
2. ... (5 Replies)
Discussion started by: alvinoo
5 Replies
3. Shell Programming and Scripting
Hi all,
Let's say I have a script calling for the two variables PA_VALUE and PB_VALUE.
for pa in PA_VALUE
blah blah
do
for pb in PB_VALUE
blah blah
do
I have a text file with two columns of values for PA and PB.
14.5 16.7
7.8 9.5
5.6 3.6
etc etc
I would like to read this... (7 Replies)
Discussion started by: crimsonengineer
7 Replies
4. Shell Programming and Scripting
Input are file and file1
file contains
store.bal
product.bal
category.bal
admin.bal
file1 contains
flip.store.bal ::FFFF:BADC:CD28,::FFFF:558E:11C5,6,8,2,1,::FFFF:81C8:CA8B,::FFFF:BADC:CD28,1,0,0,0,::FFFF:81C8:11C5,2,1,0,0,::FFFF:81DC:3111,1,0,1,0
store.bal.... (2 Replies)
Discussion started by: veeruasu
2 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to read a line and the next line in a shell script by executing the following code:
for i in `seq 1 $numLines`; do
line=$(sed -n '{$i}p' outputFile)
echo $line
done
$numLines contanis the outputFile's number of lines.
It doesn't work and I cannot... (8 Replies)
Discussion started by: JuanPerez
8 Replies
6. Shell Programming and Scripting
Hi,
I have a requirement where i have to read a file line by line and see if the string(fixed postion 10 to 15 in the file) in line 2 is greater than string in line 1.
I have used following code
while read LINE1
do
current_inv_no=$(echo "$LINE1" | cut -c 10-15)
read... (2 Replies)
Discussion started by: chethanbg2010
2 Replies
7. Shell Programming and Scripting
So, I want to read line-by-line a text file with unknown number of files....
So:
a=1
b=1
while ; do
b=`sed -n '$ap' test`
a=`expr $a + 1`
$here do something with b etc
done
the problem is that sed does not seem to recognise the $a, even when trying
sed -n ' $a p'
So, I cannot read... (3 Replies)
Discussion started by: hakermania
3 Replies
8. Shell Programming and Scripting
Hi,
I am a beginner in shell scripting. I have written the following script, which is supposed to process the while loop for each line in the sid_home.txt file. But I'm getting the 'end of file' unexpected for the last line. The file sid_home.txt gets generated as expected, but the script... (6 Replies)
Discussion started by: sagarparadkar
6 Replies
9. UNIX for Dummies Questions & Answers
hi...
i need to open a file and read it line by line, and capture that it in to some variable and manipulate...
i need to get a line in to a variable
please help :confused: (1 Reply)
Discussion started by: lmadhuri
1 Replies