Sponsored Content
Top Forums Shell Programming and Scripting Passing literal tab character from zsh to other program Post 303006947 by Scott on Thursday 9th of November 2017 09:42:52 AM
Old 11-09-2017
"\t" works also with printf, but as $'\t' works, that's probably the way to go!
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

newline character, space and tab after a string

no problem (6 Replies)
Discussion started by: angelina
6 Replies

2. Shell Programming and Scripting

why convert 8 space to 1 tab character on unix?

Hi everybody, I'm using Hp unix tru64. I have generate one file from shell script. bus that file content pre "8 space char" convert one tab character. why? result file hex format: hex 20 20 20 20 20 to 09 (6 Replies)
Discussion started by: Tlg13team
6 Replies

3. Shell Programming and Scripting

Delete parts of a string of character in one given column of a tab delimited file

I would like to remove characters from column 7 so that from an input file looking like this: >HWI-EAS422_12:4:1:69:89 GGTTTAAATATTGCACAAAAGGTATAGAGCGT U0 1 0 0 ref_chr8.fa 6527777 F DD I get something like that in an output file: ... (13 Replies)
Discussion started by: matlavmac
13 Replies

4. Shell Programming and Scripting

Trying to display a tab character in variable

Hi, I'm trying to figure out a way to encapsulate a tab character, or four or five space characters into a string variable to be used in my script. I'm using the bash shell. I tried $variablename=" <string text>" but it didnt give me the output i wanted (output was still... (7 Replies)
Discussion started by: rowlf
7 Replies

5. Shell Programming and Scripting

Passing screen value to a program

Hi all, I have the following question. Apparently not very difficult, but I'm not any expert. I have a program, let's say program.x, and a bash script that execute it, let's say program.sh. When the program executes it asks for a value to continue. What I want is just passing the value throw... (2 Replies)
Discussion started by: josegr
2 Replies

6. UNIX for Advanced & Expert Users

Strange tab-completion behavior with zsh in screen

I'm running Mac OS, using the latest version of zsh. I've noticed that I have funny tab-completion behavior when inside a screen session. Specifically, once I press tab, the first part of my command seems to be duplicated before the completion results are inserted. For example, if I type... (14 Replies)
Discussion started by: marshaul
14 Replies

7. UNIX for Advanced & Expert Users

"╭─ " Character combo in $PATH causes strange autocompletion behavior in zsh

I've posted about this before, but only recently narrowed the problem down to a specific cause. Ok, first of all, the behavior: It occurs when autocompletion brings up its list (not when there is only a single option). Basically, if I were to type, say, cd ~/<TAB> I would get something... (2 Replies)
Discussion started by: marshaul
2 Replies

8. UNIX for Dummies Questions & Answers

Remove tab character from file

I am trying to remove the tab character from a file, which occurs on two places in every line. So far I have tried the following and most are from threads in this forum: sed -i '' -e 's/ / /' file.dat sed -i '' -e 's/*/ /' file.dat sed -i '' -e 's/\t*/ /g' file.dat sed -i '' -e 's/*//g'... (4 Replies)
Discussion started by: figaro
4 Replies

9. Shell Programming and Scripting

[Solved] SED - Bash - Inserting multi Tab character in the command

Hello. I am using : sed -i -e '/§name_script§/a#'"${MY_TAB11}"'# \ #'"${MY_TAB1}"'The Standard way'"${MY_TAB7}"'# \ #'"${MY_TAB1}"'==============='"${MY_TAB7}"'# \ ' "$CUR_FILE" Is there a better way to define "MY_TAB7","MY_TAB11" in other way than : MY_TAB1=$'\t' MY_TAB2=${MY_TAB1}$'\t'... (2 Replies)
Discussion started by: jcdole
2 Replies

10. Shell Programming and Scripting

How to avoid "Too many arguments" error, when passing a long String literal as input to a command?

Hi, I am using awk here. Inside an awk script, I have a variable which contains a very long XML data in string format (500kb). I want to pass this data (as argument) to curl command using system function. But getting Too many arguments error due to length of string data(payloadBlock). I... (4 Replies)
Discussion started by: cool.aquarian
4 Replies
MAXDB_MULTI_QUERY(3)							 1						      MAXDB_MULTI_QUERY(3)

maxdb_multi_query - Performs a query on the database

       Procedural style

SYNOPSIS
bool maxdb_multi_query (resource $link, string $query) DESCRIPTION
Object oriented style bool maxdb::multi_query (string $query) The maxdb_multi_query(3) works like the function maxdb_query(3). Multiple queries are not yet supported. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 Object oriented style <?php $maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } $query = "SELECT * FROM dual"; /* execute multi query */ if ($maxdb->multi_query($query)) { do { /* store first result set */ if ($result = $maxdb->store_result()) { while ($row = $result->fetch_row()) { printf("%s ", $row[0]); } $result->close(); } /* print divider */ if ($maxdb->more_results()) { printf("----------------- "); } } while ($maxdb->next_result()); } /* close connection */ $maxdb->close(); ?> Example #2 Procedural style <?php $link = maxdb_connect("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } $query = "SELECT * FROM dual"; /* execute multi query */ if (maxdb_multi_query($link, $query)) { do { /* store first result set */ if ($result = maxdb_store_result($link)) { while ($row = maxdb_fetch_row($result)) { printf("%s ", $row[0]); } maxdb_free_result($result); } /* print divider */ if (maxdb_more_results($link)) { printf("----------------- "); } } while (maxdb_next_result($link)); } /* close connection */ maxdb_close($link); ?> The above example will output something similar to: a SEE ALSO
maxdb_use_result(3), maxdb_store_result(3), maxdb_next_result(3), maxdb_more_results(3). PHP Documentation Group MAXDB_MULTI_QUERY(3)
All times are GMT -4. The time now is 08:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy