Cat没有在文件中写入特殊变量(Cat not writing special variables in file)
我正在使用cat将脚本shell写入文件。
cat <<EOF >/home/test.txt set $value1 $value2; EOF
我的文件只包含这个字符串“set” 但我需要找到“set $ value1 $ value2;”。 我猜猫认为“$ value1”是一个shell变量,但它只是一个字符串,我需要写入一个文件。
I am using cat to write into file with script shell.
cat <<EOF >/home/test.txt set $value1 $value2; EOF
My file containts just this string "set ;" but i need to find "set $value1 $value2;". I guess cat thinks "$value1" is a shell variable but it is just a string that i need to write into a file.
原文:https://stackoverflow.com/questions/18636761
最满意答案
你返回true,告诉系统你正在处理触摸事件,这意味着按钮不是,这意味着它可能没有更新它的按下状态。 尝试返回false。
You're returning true, which tells the system that you are handling the touch events, which means the button is not, which means it's probably not updating its pressed state. Try returning false.
相关问答
更多-
检查按钮是否被点击(Checking if a Button was clicked)[2022-06-16]
扩展你的代码,你也可以做到这一点 self.button14.connect("clicked", self.button14_click, "division") def button14_click(self, button, data): self.entry.set_text(self.entry.get_text() + str("/")) self.equal_clicked() self.arithmetic = data Extend your code y ... -
您应该使用Intent开始第二个活动。 对于此Intent,您可以放置一些参数。 在您的第一个活动中: Button b1 = (Button)findViewById(R.id.button1); Button b2 = (Button)findViewById(R.id.button2); // Set OnClickListeners b1.setOnClickListener(new View.OnClickListener() { @Override public void onCli ...
-
我得到的解决方案是你压倒价格等级的价值。 我在这里使用了一个新的输入类名originalPrice。 我从originalPrice获得原始成本价格并将其发送到价格并执行您想要的操作 $(document).ready(function(e) { $('.time-slot').on('click', function() { $('.time-slot').removeClass('active1'); $(this).addClass('active1'); va ...
-
尝试如下...... protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack == true) { Session["button1WasClicked "] = false; } } protected void linkToday_Click(object sender, EventArgs e) { ...
-
你返回true,告诉系统你正在处理触摸事件,这意味着按钮不是,这意味着它可能没有更新它的按下状态。 尝试返回false。 You're returning true, which tells the system that you are handling the touch events, which means the button is not, which means it's probably not updating its pressed state. Try returning false. ...
-
如果是自定义对话框,一种方法是在非模式对话框关闭时使用SendMessage()或PostMessage()将结果发送到主对话框。 If its a custom dialog, one way would be to use SendMessage() or PostMessage() to send the result to the main dialog when the non-modal dialog closes.
-
我怎样才能检查是否点击了二维数组的任何按钮?(How can I check if any button of a two dimensional array was clicked?)[2023-05-04]
当您创建按钮时,将它们的Tag属性设置为一个ID: Button.Tag := Col + Row*ColCount; 为每个按钮提供相同的OnClick事件处理程序。 Button.OnClick := ButtonClick; 这两行代码将在这样的循环内: for Row := 0 to RowCount-1 do for Col := 0 to ColCount-1 do begin Button := TButton.Create(Self); Button.Parent ... -
使用此按钮: 用这个: $('mybutton').observe('click', function () { alert('Hi'); }); 在这里测试和工作。 您可能希望将其包含在document.observe('dom:loaded', function () { }) ,以防止它在页面加载之前执行。 另外,只是一个解释: Prototype中的单个美元符号通过其id选择一个元素。 .observe函数与jQ ...
-
单击按钮时,可以使“复制”对话框返回DialogResult 。 例如,您可以使用DialogRsult.OK作为Replace按钮,使用DialogResult.Cancel作为Keep按钮。 像这样的东西: 单击“复制”对话框中的“替换”按钮时,可以在Replace_Click事件处理程序中进行设置 this.DialogResult = DialogResult.OK; this.Close(); 在Keep_Click事件处理程序中以类似的方式设置DialogResult.Cancel 你可以这样 ...
-
button.settag(0); --> X button.settag(1); --> O button.gettag(); button.settag(0); --> X button.settag(1); --> O button.gettag();