Sponsored Content
Top Forums Shell Programming and Scripting Select row from file and text Post 302886256 by giuliangiuseppe on Thursday 30th of January 2014 10:07:49 AM
Old 01-30-2014
Thanks!;-)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Changing the column for a row in a text file and adding another row

Hi, I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value . For Eg . if the input file has a row : abc xyz lmn 89 lm nk o p I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies

2. UNIX for Dummies Questions & Answers

select distinct row from a file

Hi, buddies out there. I have a text file ( only one column ) which I created using vi editor. The file contains duplicate rows and I would like to select distinct rows, how to go on it using unix command: file content = apple apple orange watermelon apple orange Can it be done... (7 Replies)
Discussion started by: merry susana
7 Replies

3. Shell Programming and Scripting

random select text file ranamed

i want to need script.. source.txt /home/user1/public_html/test3 /home/user90/public_html/test9 . . . /home/user650/public_html/test000 read source.txt and cd /home/user**/public_html/*** and there is 1.txt, 2txt ~~25.txt and select 6 text files randomly among the... (4 Replies)
Discussion started by: topic32428285
4 Replies

4. Shell Programming and Scripting

how can I bcp out a table into a text file including the header row in the text file

Hi All, I need to BCP out a table into a text file along with the table headers. Normal BCP out command only bulk copies the data, and not the headers. I am using the following command: bcp database1..table1 out file1.dat -c -t\| -b1000 -A8192 -Uuser -Ppassword -efile.dat.err Regards,... (0 Replies)
Discussion started by: shilpa_acc
0 Replies

5. Shell Programming and Scripting

select always the first row

Hi, I have an output like this: #CMD Output: user1 user2 user3 user4 How can I select ONLY the first row? Thanks (4 Replies)
Discussion started by: iga3725
4 Replies

6. Shell Programming and Scripting

mysql how to select a specific row from a table

i have a table records ------------ id | user | time | event 91 admin | 12:00 | hi 92 admin | 11:00 | hi 93 admin | 12:00 | bye 94 admin | 13:00 | bye 95 root | 12:00 | hi 96 root | 12:30 | hi 97 root | 12:56 | hi how could i only select and display only the user and event from... (6 Replies)
Discussion started by: kpddong
6 Replies

7. UNIX for Dummies Questions & Answers

Select text between current date and output to new txt file

Hi guys, brand new to this thread and very very new to UNIX...so go easy please! Anyway I have a file that looks like this: >>-------------------------------------------------------------------------- Date/Time/Eng. : 2012-06-22 / 00:26 / DS Reported problem : (SD) ... (5 Replies)
Discussion started by: martin0852
5 Replies

8. UNIX for Dummies Questions & Answers

How to randomly select lines from a text file

I have a text file with 1000 lines, I want to randomly select 200 lines from it and print them as output. How do I go about doing that? Thanks! (7 Replies)
Discussion started by: evelibertine
7 Replies

9. UNIX for Dummies Questions & Answers

Select 2 columns and transpose row by row

Hi, I have a tab-delimited file as follows: 1 1 2 2 3 3 4 4 a a b b c c d d 5 5 6 6 7 7 8 8 e e f f g g h h 9 9 10 10 11 11 12 12 i i j j k k l l 13 13 14 14 15 15 16 16 m m n n o o p p The output I need is: 1 1 a a 5 5 e e 9 9 i i 13... (5 Replies)
Discussion started by: mvaishnav
5 Replies

10. UNIX for Beginners Questions & Answers

Using grep to select specific patterns in text file?

How do I use grep to select words that start with I or O, end in box, and contain at least one letter in between them? the text file mailinfo.txt contains Inbox the Inbox Is a match box Doesn't match INBOX Outbox Outbox1 InbOX Ibox I box If the command works correctly it... (4 Replies)
Discussion started by: steezuschrist96
4 Replies
MSSQL_FETCH_ROW(3)														MSSQL_FETCH_ROW(3)

mssql_fetch_row - Get row as enumerated array

SYNOPSIS
array mssql_fetch_row (resource $result) DESCRIPTION
mssql_fetch_row(3) fetches one row of data from the result associated with the specified result identifier. The row is returned as an array. Each result column is stored in an array offset, starting at offset 0. Subsequent call to mssql_fetch_row(3) would return the next row in the result set, or FALSE if there are no more rows. PARAMETERS
o $result - The result resource that is being evaluated. This result comes from a call to mssql_query(3). RETURN VALUES
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. EXAMPLES
Example #1 mssql_fetch_row(3) example <?php // Connect to MSSQL and select the database $link = mssql_connect('MANGOSQLEXPRESS', 'sa', 'phpfi'); mssql_select_db('php', $link); // Query to execute $query = mssql_query('SELECT [id], [quote] FROM [quotes] WHERE [id] = '42'', $link); // Did the query fail? if (!$query) { die('MSSQL error: ' . mssql_get_last_message()); } // Fetch the row $row = mssql_fetch_row($query); // Print the 'quote' echo 'Quote #' . $row[0] . ': "' . $row[1] . '"'; ?> The above example will output something similar to: Quote #42: "The answer to everything..." NOTES
Note This function sets NULL fields to the PHP NULL value. SEE ALSO
mssql_fetch_array(3), mssql_fetch_object(3), mssql_data_seek(3), mssql_result(3). PHP Documentation Group MSSQL_FETCH_ROW(3)
All times are GMT -4. The time now is 04:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy