Sponsored Content
Full Discussion: newline in echo
Top Forums UNIX for Dummies Questions & Answers newline in echo Post 302388043 by methyl on Tuesday 19th of January 2010 08:47:17 AM
Old 01-19-2010
Try this:

Code:
#!/bin/csh
echo ""
echo ""
echo "WHAT AREA DO YOU WANT:"
echo ""
echo ""
echo "     YOUR CHOISE : \c"
set area=$<


Failing that, please state your Operating System.

Last edited by methyl; 01-19-2010 at 09:54 AM.. Reason: Removed space from shebang line
 

10 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

newline

I have an old file originally created in vi but read and saved by a word processor at some point. I have ^Ms and know how to substitute them for anything I wish but I still only have one long line when viewed in vi. So I suppose I need to substitute a newline for each ^M but I don't know the... (2 Replies)
Discussion started by: Gale Gorman
2 Replies

2. Shell Programming and Scripting

replace a newline (\n)

dear all: maybe i have a file like : 12 34 56 78 end how do write can i replace newline into NA : make the file inte : 12 NA 34 NA 56 78 END (3 Replies)
Discussion started by: jeter
3 Replies

3. UNIX for Dummies Questions & Answers

newline character

hi, I want to print the below lines "Message from bac logistics The Confirmation File has not been received." When i give like this in the code "Message from bac logistics\n The Confirmation File has not been received." It is giving only Message from bac logistics\n The... (9 Replies)
Discussion started by: trichyselva
9 Replies

4. UNIX for Dummies Questions & Answers

echo without newline character

hi, I have a for loop where in I write some file name to another file. I want to write all the filenames to another without any newlines. how can i avoid getting new lines with echo? Thanks, Srilaxmi (2 Replies)
Discussion started by: srilaxmi
2 Replies

5. Shell Programming and Scripting

Difference between using "echo" builtin and /bin/echo

So in my shell i execute: { while true; do echo string; sleep 1; done } | read line This waits one second and returns. But { while true; do /bin/echo string; sleep 1; done } | read line continues to run, and doesn't stop until i kill it explicitly. I have tried this in bash as well as zsh,... (2 Replies)
Discussion started by: ulidtko
2 Replies

6. UNIX for Dummies Questions & Answers

How to correctly use an echo inside an echo?

Bit of a weird one i suppose, i want to use an echo inside an echo... For example... i have a script that i want to use to take users input and create another script. Inside this script it creates it also needs to use echos... echo "echo "hello"" >$file echo "echo "goodbye"" >$file ... (3 Replies)
Discussion started by: mokachoka
3 Replies

7. Shell Programming and Scripting

With that logic this echoes "echo". Question about echo!

echo `echo ` doesn't echoes anything. And it's logic. But echo `echo `echo ` ` does echoes "echo". What's the logic of it? the `echo `echo ` inside of the whole (first) echo, echoes nothing, so the first echo have to echo nothing but echoes "echo" (too much echoing :P):o (2 Replies)
Discussion started by: hakermania
2 Replies

8. Shell Programming and Scripting

Echo to file using SH without adding newline character

Hello! I am able to do this in bash, using: echo -ne HELLO > file.txt and then, 'HELLO' is written into file.txt without the newline character to be added in the end of the file. How is this possible to be done using sh instead of bash? If I try something similar is SH, then inside... (3 Replies)
Discussion started by: hakermania
3 Replies

9. Shell Programming and Scripting

tcsh - understanding difference between "echo string" and "echo string > /dev/stdout"

I came across and unexpected behavior with redirections in tcsh. I know, csh is not best for redirections, but I'd like to understand what is happening here. I have following script (called out_to_streams.csh): #!/bin/tcsh -f echo Redirected to STDOUT > /dev/stdout echo Redirected to... (2 Replies)
Discussion started by: marcink
2 Replies

10. Shell Programming and Scripting

echo without newline

I am trying to make a download progress meter with bash and I need to echo a percentage without making a newline and without concatenating to the last output line. The output should replace the last output line in the terminal. This is something you see when wget or curl downloads files.... (6 Replies)
Discussion started by: locoroco
6 Replies
MSSQL_FETCH_FIELD(3)													      MSSQL_FETCH_FIELD(3)

mssql_fetch_field - Get field information

SYNOPSIS
object mssql_fetch_field (resource $result, [int $field_offset = -1]) DESCRIPTION
mssql_fetch_field(3) can be used in order to obtain information about fields in a certain query result. PARAMETERS
o $result - The result resource that is being evaluated. This result comes from a call to mssql_query(3). o $field_offset - The numerical field offset. If the field offset is not specified, the next field that was not yet retrieved by this function is retrieved. The $field_offset starts at 0. RETURN VALUES
Returns an object containing field information. The properties of the object are: o name - column name. if the column is a result of a function, this property is set to computed#N, where #N is a serial number. o column_source - the table from which the column was taken o max_length - maximum length of the column o numeric - 1 if the column is numeric o type - the column type. EXAMPLES
Example #1 mssql_fetch_field(3) example <?php // Connect to MSSQL and select the database mssql_connect('MANGOSQLEXPRESS', 'sa', 'phpfi'); mssql_select_db('php'); // Send a select query to MSSQL $query = mssql_query('SELECT * FROM [php].[dbo].[persons]'); // Construct table echo '<h3>Table structure for 'persons'</h3>'; echo '<table border="1">'; // Table header echo '<thead>'; echo '<tr>'; echo '<td>Field name</td>'; echo '<td>Data type</td>'; echo '<td>Max length</td>'; echo '</tr>'; echo '</thead>'; // Dump all fields echo '<tbody>'; for ($i = 0; $i < mssql_num_fields($query); ++$i) { // Fetch the field information $field = mssql_fetch_field($query, $i); // Print the row echo '<tr>'; echo '<td>' . $field->name . '</td>'; echo '<td>' . strtoupper($field->type) . '</td>'; echo '<td>' . $field->max_length . '</td>'; echo '</tr>'; } echo '</tbody>'; echo '</table>'; // Free the query result mssql_free_result($query); ?> SEE ALSO
mssql_field_seek(3). PHP Documentation Group MSSQL_FETCH_FIELD(3)
All times are GMT -4. The time now is 06:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy