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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT LINUX
ndb_delete_all
NDB_DELETE_ALL(1) MySQL Database System NDB_DELETE_ALL(1)NAME
ndb_delete_all - delete all rows from an NDB table
SYNOPSIS
ndb_delete_all options
DESCRIPTION
ndb_delete_all deletes all rows from the given NDB table. In some cases, this can be much faster than DELETE or even TRUNCATE TABLE.
Usage
ndb_delete_all -c connect_string tbl_name -d db_name
This deletes all rows from the table named tbl_name in the database named db_name. It is exactly equivalent to executing TRUNCATE
db_name.tbl_name in MySQL.
The following table includes options that are specific to ndb_delete_all. Additional descriptions follow the table. For options common to
most MySQL Cluster programs (including ndb_delete_all), see Options Common to MySQL Cluster Programs(1).
Table 17.16. ndb_delete_all Options and Variables: MySQL Cluster NDB 7.2
+--------------------------+-----------------------------------+-------------------------------------+
|Format | Description | Added / Removed |
+--------------------------+-----------------------------------+-------------------------------------+
| | Name of the database in which the | |
| --database=dbname, | table is found | All MySQL 5.5 based releases |
| | | |
| -d | | |
+--------------------------+-----------------------------------+-------------------------------------+
| | Perform the delete in a single | |
| --transactional, | transaction (may run out of | All MySQL 5.5 based releases |
| | operations) | |
| -t | | |
+--------------------------+-----------------------------------+-------------------------------------+
| | Run tup scan | |
| --tupscan | | All MySQL 5.5 based releases |
+--------------------------+-----------------------------------+-------------------------------------+
| | Run disk scan | |
| --diskscan | | All MySQL 5.5 based releases |
+--------------------------+-----------------------------------+-------------------------------------+
o --transactional, -t
Use of this option causes the delete operation to be performed as a single transaction.
Warning
With very large tables, using this option may cause the number of operations available to the cluster to be exceeded.
COPYRIGHT
Copyright (C) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as
published by the Free Software Foundation; version 2 of the License.
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.
SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online
at http://dev.mysql.com/doc/.
AUTHOR
Oracle Corporation (http://dev.mysql.com/).
MySQL 5.5 01/30/2014 NDB_DELETE_ALL(1)