Sponsored Content
Full Discussion: Bash Command
Top Forums UNIX for Dummies Questions & Answers Bash Command Post 282 by PxT on Sunday 19th of November 2000 09:47:44 PM
Old 11-19-2000
The \c argument to echo will work in bash also.

Some version of echo also support the -n switch to suppress newlines.

ex:

$ echo -n Hello.
Hello.$

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Another Bash Command

This is sort of the same question I recently asked: In my script I'm outputing lines of various symbols. When I run my script it prints the information vertically. I need my script to print out horizontally. I know in the Korn shell you use \c, but it doesn't seem to work in bash - it will... (1 Reply)
Discussion started by: Astudent
1 Replies

2. Shell Programming and Scripting

Sort (bash command)

I did a search on this, and found lots on SORT but no answer to my question. I have a C program that fetches all of our users from Netware, and I have that it makes a file that I later include in a html as a select tag drop-down menu. Here is what 1 line looks like: <option... (5 Replies)
Discussion started by: booboo
5 Replies

3. Linux

Install bash command

Hello, I am trying to copy some dirs and files over from one part of my server to the other with groups, owners and permissions so . . . I am using the command: install -m <777> -o <owner> -g <group> /<source>/* /<destination> This works fine for the files but gives me "install:... (1 Reply)
Discussion started by: dave_c00
1 Replies

4. UNIX for Dummies Questions & Answers

BASH tr command help

hi guys, Is there an easy way to tr a letter into a word?? eg. tr "a" "apple" Thanks for any help (2 Replies)
Discussion started by: 602chrislys
2 Replies

5. AIX

Typing "bash" at the command line spawns two bash processes

Server: IBM p770 OS: AIX 6.1 TL5 SP1 When one of our develoeprs types "bash" on the command line to switch shells, it hangs. For some reason, two bash processes are created....the first bash process spawns a second bash process in the same console, causing a hang. Anyone have any idea what... (2 Replies)
Discussion started by: wjssj
2 Replies

6. UNIX for Dummies Questions & Answers

Running set options from the command line and bash command

I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing set you can also use them "on the command line when running a script..." and it lists this in a small table: set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies

7. Shell Programming and Scripting

bash: <command nm> command not found

I created a script that I need to run from time to time, but get this error message. To get it working again I run this command from time to time: export PATH="$PATH:~/scripts" I put all my automated scripts in the /scripts directory and would like to run my scripts from any directory... (5 Replies)
Discussion started by: catalinawinemxr
5 Replies

8. Shell Programming and Scripting

bash:getopts command help

How can I say one of the options is required? can I use an if statement? let say: while getopts ":c:u:fp" opt; do case $opt in c) echo "-c was triggered, Parameter: $OPTARG" >&2;; u) echo "-u was triggered, Parameter: $OPTARG" >&2;; f) echo "-u was triggered,... (2 Replies)
Discussion started by: bashily
2 Replies

9. Shell Programming and Scripting

Cp command works on command line but not in bash

The below command moves all the .vcf files into the directory. cp /home/cmccabe/Desktop/test/vcf/overall/stats/*.vcf /home/cmccabe/Desktop/NGS/annovar When I use a bash wrapper the target.txt gets created but the text files do not get copied. All the paths are the same, but not sure why... (2 Replies)
Discussion started by: cmccabe
2 Replies

10. Shell Programming and Scripting

How to run several bash commands put in bash command line?

How to run several bash commands put in bash command line without needing and requiring a script file. Because I'm actually a windows guy and new here so for illustration is sort of : $ bash "echo ${PATH} & echo have a nice day!" will do output, for example:... (4 Replies)
Discussion started by: abdulbadii
4 Replies
MSSQL_NUM_FIELDS(3)													       MSSQL_NUM_FIELDS(3)

mssql_num_fields - Gets the number of fields in result

SYNOPSIS
int mssql_num_fields (resource $result) DESCRIPTION
mssql_num_fields(3) returns the number of fields in a result set. PARAMETERS
o $result - The result resource that is being evaluated. This result comes from a call to mssql_query(3). RETURN VALUES
Returns the number of fields, as an integer. EXAMPLES
Example #1 mssql_num_fields(3) example <?php // Connect to MSSQL and select the database $link = mssql_connect('KALLESPCSQLEXPRESS', 'sa', 'phpfi'); mssql_select_db('php', $link); // Select some data from our database $data = mssql_query('SELECT [name], [age] FROM [php].[dbo].[persons]'); // Construct a table echo '<table border="1">'; $header = false; // Iterate through returned results while ($row = mssql_fetch_array($data)) { // Build the table header if (!$header) { echo '<thead>'; echo '<tr>'; for ($i = 1; ($i + 1) <= mssql_num_fields($data); ++$i) { echo '<td>' . ucfirst($row[$i]) . '</td>'; } echo '</tr>'; echo '</thead>'; echo '<tbody>'; $header = true; } // Build the row echo '<tr>'; foreach($row as $value) { echo '<td>' . $value . '</td>'; } echo '</tr>'; } // Close table echo '</tbody>'; echo '</table>'; // Clean up mssql_free_result($data); mssql_close($link); ?> SEE ALSO
mssql_query(3), mssql_fetch_field(3), mssql_num_rows(3). PHP Documentation Group MSSQL_NUM_FIELDS(3)
All times are GMT -4. The time now is 09:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy