Sponsored Content
Top Forums Shell Programming and Scripting how to add ; at the end of last line Post 302356806 by rdcwayx on Sunday 27th of September 2009 07:51:31 PM
Old 09-27-2009
Code:
echo "select * from tab" |awk '{print $0";"}'

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Add a new end of line

Hi, Does anyone know if its possible to add something like an end of line like c or java in unix? dirs=/home/nosnam var='' for dir in $dirs do listDirs=`ls -d1 $dir/*` for eachList in $listDirs do listRepos=`du -ks $eachList | awk '{ x+=$1 }; END { print x... (4 Replies)
Discussion started by: nosnam
4 Replies

2. UNIX for Advanced & Expert Users

Add line numbers to end of each line

Hi i would like to add line numbers to end of each line in a file. I am able to do it in the front of each line using sed, but not able to add at the end of the file. Can anyone suggest The following code adds line number to start of each line sed = filename | sed 'N;s/\n/\t/' how can i... (5 Replies)
Discussion started by: rudoraj
5 Replies

3. Shell Programming and Scripting

To add a number at the end of the line

Hi Folks, Using the Vi, how can I add a numbers at the end of the line. For eg: I have the numbers in the file as: 58.125.33 22.58.68 25.144.225 114.25.38 I need to add .0/8 at the end of all the line. So, it should be like 58.125.33.0/8 22.58.68.0/8 25.144.225.0/8 114.25.38.0/8 (6 Replies)
Discussion started by: gsiva
6 Replies

4. Shell Programming and Scripting

Get the 1st 99 characters and add new line feed at the end of the line

I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed). AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC MY * A02 RESALE 6990788000 Y... (3 Replies)
Discussion started by: udelalv
3 Replies

5. Shell Programming and Scripting

Add string end of line

Hello How can I add a string (always the same) at the end of a specific line in a file... The file is: 000000001 041 L $$aspa 000000001 088 L $$aJ.E.N. 551 000000001 090 L $$aINFORMES JEN 000000001 100 L $$aautor 1 ---- 000000002 041 L $$aeng 000000002 088 L $$aJ.E.N. 1... (13 Replies)
Discussion started by: ldiaz2106
13 Replies

6. Shell Programming and Scripting

Need to add symbol in every end of line.

hi, In my input file i have less number of pipe symbol , it is suppose to be 10 pipe symbol. If the inputfile have less than 10 pipesymbol then i need append upto 10 pipe symbol. please help to solve problem. Input file : abc|xyz| 1|2|3|4|5| s| 1|2||||||||| Output file : ... (4 Replies)
Discussion started by: Jairaj
4 Replies

7. Shell Programming and Scripting

Add line at the end

How to add a comma at the end of each line in this file?30 1412 30 3352 30 5254 30 5543 30 7478 3 28 3 30 3 39 3 54 3 108 3 152 3 178 3 182 3 214 3 271 3 286 3 300 3 348 3 349 3 371 (3 Replies)
Discussion started by: gunjan
3 Replies

8. Shell Programming and Scripting

How to add a character at end of line?

Hai, I have got a small requirement in my script. and i am using bash shell. I need to add a dot (.) for some particular line in a file. Say for example, $Cat rmfile 1 This is line1 2 This is line2 3 This is line3 O/p should be : $Cat rmfile 1 This is line1 2 This is line2. #... (2 Replies)
Discussion started by: Sivajee
2 Replies

9. Shell Programming and Scripting

Add a new field at the end of each line

i want to add a white-space at the end of each line for my inp.file, but when i do it, the result is a new line with a white-space between each line! my input: 2012 0811 1223 15.2 L 38.393 46.806 9.0 Teh 78 0.5 6.5LTeh 1 GAP=74 ... (5 Replies)
Discussion started by: saeed.soltani
5 Replies

10. Shell Programming and Scripting

Add text to the end of line

Seems simple but ive been searching for a good hour of so I have a text file and would like to add a string to the end of line 5 ( as an example) to ake tings hard the line number we have to add the text to is stored in a variable cunningly name $Line_to_append any ideas on how this could... (2 Replies)
Discussion started by: dunryc
2 Replies
MSSQL_NEXT_RESULT(3)													      MSSQL_NEXT_RESULT(3)

mssql_next_result - Move the internal result pointer to the next result

SYNOPSIS
bool mssql_next_result (resource $result_id) DESCRIPTION
When sending more than one SQL statement to the server or executing a stored procedure with multiple results, it will cause the server to return multiple result sets. This function will test for additional results available form the server. If an additional result set exists it will free the existing result set and prepare to fetch the rows from the new result set. PARAMETERS
o $result_id - The result resource that is being evaluated. This result comes from a call to mssql_query(3). RETURN VALUES
Returns TRUE if an additional result set was available or FALSE otherwise. EXAMPLES
Example #1 mssql_next_result(3) example <?php // Connect to MSSQL and select the database $link = mssql_connect('MANGOSQLEXPRESS', 'sa', 'phpfi'); mssql_select_db('php', $link); // Send a query to MSSQL $sql = 'SELECT [name], [age] FROM [php].[dbo].[persons]'; $query = mssql_query($sql, $link); // Iterate through returned records do { while ($row = mssql_fetch_row($query)) { // Handle record ... } } while (mssql_next_result($query)); // Clean up mssql_free_result($query); mssql_close($link); ?> PHP Documentation Group MSSQL_NEXT_RESULT(3)
All times are GMT -4. The time now is 07:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy