Using " in csh


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Using " in csh
# 1  
Old 09-12-2010
Using " in csh

I have a variable called format and I want it to contain the string

format="X T"

The quotes are needed.

Code:
set format = "X T"
set format = 'format="'$format'"'

# 2  
Old 09-12-2010
MySQL

Code:
set format = '"X T"'
echo $format

/* output */
"X T"

set format = "format=$format"
echo $format

/* output */
format="X T"

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

Using "if -e" with wildcard in csh

Hi Gurus, In ksh we can check the existance of a file using wild card like ... if But in csh is there something like this ??? I have tried to use the following... if -e /home/dbadm/client1/emailblocked/ludhiana5.txt.* then But its getting failed and giving me the following... (4 Replies)
Discussion started by: sraj142
4 Replies

3. Shell Programming and Scripting

(CSH basic construct) "@" query

While going through a script, i came across few syntax which I am not aware of what they exactly means. @ cnt = 1 @ num_all = `echo $var` What is the significance of "@" here. What is it called? (3 Replies)
Discussion started by: animesharma
3 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. UNIX for Dummies Questions & Answers

"$?1 || $<" in csh

Hi: I am trying to create an alias that takes an argument, but if the argument is missing, gets it from the STDIN. so something like this: alias foo ' dosomething $?1 || $<' But obviously it does not work. What is the typical way to achieve that? Thanks. newbie Phil (6 Replies)
Discussion started by: phil518
6 Replies

6. Shell Programming and Scripting

How to "time" a loop in CSH ?

Hi, I am trying to estimate the time that each part of my program takes to execute. With BASH, I used to use time: #!/bin/bash time while do .... .... done This work just fine. However some of my program is in CSH. I tried the same kind of command, but it does not work: #!/bin/csh... (3 Replies)
Discussion started by: jolecanard
3 Replies

7. Shell Programming and Scripting

csh failing to call an 2 embedded csh script

I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them) Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
Discussion started by: pollsizer
1 Replies

8. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

9. Shell Programming and Scripting

Exactly How can we define "sh ksh csh &bash"

Hi - I m prashant. I m new in UNIX&LINUX world. I want to ask that how can we define the shell in Linux like bash,ksh,csh in Linux. What is the use of these shells. I know there are mny experts on net if you can tell me then please do me this favour and tell me about this topic. ... (1 Reply)
Discussion started by: prashantsingh
1 Replies

10. Shell Programming and Scripting

ksh "while" loop within a csh script

I'm no unix pro for sure, but I have programmed enough other languages to usually get the job done in unix when I have to. I'm currently trying to automate a manual diagnostic process. One of the steps in the manual process generates a file of text output. The next step is running a small... (4 Replies)
Discussion started by: bschnair
4 Replies
Login or Register to Ask a Question