Sponsored Content
Top Forums Shell Programming and Scripting Passing literal tab character from zsh to other program Post 303006934 by rovf on Thursday 9th of November 2017 08:01:57 AM
Old 11-09-2017
Passing literal tab character from zsh to other program

I have a Zsh script which invokes another program. One of the paramters to be passed, should be a literal tab, i.e what in common programming languages is often written as "\t".

If it were bash, I think I could use the special form

Code:
$"\t"

but this doesn't seem to work (the called program sees a two-character string, backslash and t). I also tried putting octal code using $`010`, but no effect either (this is simply received as 010).

How can this be done in Zsh?
 

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
MrmFetchColorLiteral(3X)												  MrmFetchColorLiteral(3X)

NAME
MrmFetchColorLiteral - Fetches a named color literal from a UID file SYNOPSIS
#include <Mrm/MrmPublic.h> int MrmFetchColorLiteral(hierarchy_id, index, display, colormap_id, pixel) MrmHierarchy hierarchy_id; String index; Display *display; Colormap colormap_id; Pixel *pixel; DESCRIPTION
The MrmFetchColorLiteral function fetches a named color literal from a UID file, and converts the color literal to a pixel color value. Specifies the ID of the UID hierarchy that contains the specified literal. The hierarchy_id was returned in a previous call to MrmOpenHier- archyPerDisplay. Specifies the UIL name of the color literal to fetch. You must define this name in UIL as an exported value. Specifies the display used for the pixmap. The display argument specifies the connection to the X server. For more information on the Display struc- ture, see the Xlib function XOpenDisplay. Specifies the ID of the color map. If NULL, the default color map is used. Returns the ID of the color literal. RETURN VALUE
This function returns one of these status return constants: The function executed successfully. The hierarchy ID was invalid. The color literal was not found in the UIL file. The caller tried to fetch a literal of a type not supported by this function. The function failed. SEE ALSO
MrmFetchBitmapLiteral(3X), MrmOpenHierarchyPerDisplay(3X), MrmFetchIconLiteral(3X), MrmFetchLiteral(3X), XOpenDisplay(3X11) MrmFetchColorLiteral(3X)
All times are GMT -4. The time now is 06:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy