command-line

How do I get out of a >> prompt in powershell when I made a mistake?

僤鯓⒐⒋嵵緔 提交于 2020-07-28 12:03:06
问题 I use powershell with git for the poshgit features and sometimes I'll make an error typing the git command like git commit -m 'something and for get to close the ' before hitting enter. It goes to the new line I type ' and hit enter and I still get the >> prompt. Is there any easy way to say give me back a new prompt and get out of the infinite >> loop with out closing powershell? 回答1: Press ctrl + C . 回答2: @jon Z 's answer tells you how to abort it, but what you want is to hit enter at the

How to do a simple file search in cmd

大憨熊 提交于 2020-07-28 05:09:34
问题 I want to quickly search for a file given its name or part of its name, from the windows command line (not power shell). This is similar to opening explorer and using the search box at the top. Note: dir can search based on a string template but it will not search in the subdirectories. Note2: findstr can be used to search for a token inside files and has a recursivity flag; it's funny that a more complex find can be easily discovered ... 回答1: dir /s *foo* searches in current folder and sub

Replace text in a file using sed on windows

守給你的承諾、 提交于 2020-07-23 03:52:18
问题 I am trying to replace a string in a .ism file using the SED command but it is failing for me. The line in the file is the product version which I want to change in every build. <row><td>ProductVersion</td><td>1.0.0</td><td/></row> And here is the command I'm trying: c:\rt_cygwin\bin\sed -i -r "s/ProductVersion\\"+[0-9].+[0-9].+[0-9] /ProductVersion\"1.0.%BUILD_NUMBER%/" "D:\lm.ism" Thanks 回答1: c:\rt_cygwin\bin\sed -i -r "s/ProductVersion</td>[0-9].[0-9].[0-9]/ProductVersion 1.0.%BUILD_NUMBER

Replace text in a file using sed on windows

牧云@^-^@ 提交于 2020-07-23 03:51:07
问题 I am trying to replace a string in a .ism file using the SED command but it is failing for me. The line in the file is the product version which I want to change in every build. <row><td>ProductVersion</td><td>1.0.0</td><td/></row> And here is the command I'm trying: c:\rt_cygwin\bin\sed -i -r "s/ProductVersion\\"+[0-9].+[0-9].+[0-9] /ProductVersion\"1.0.%BUILD_NUMBER%/" "D:\lm.ism" Thanks 回答1: c:\rt_cygwin\bin\sed -i -r "s/ProductVersion</td>[0-9].[0-9].[0-9]/ProductVersion 1.0.%BUILD_NUMBER

Percent sign at the end of the output of python script [closed]

余生长醉 提交于 2020-07-22 22:16:46
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . Improve this question Why is a percent sign at the end of the output of the python script? $ echo "TEST TEST" | trim TESTTEST% #!/usr/bin/env python import sys if __name__ == "__main__": for line in sys.stdin: sys.stdout.write(''.join(line.split())) 回答1: The % you see there might actually be your

Percent sign at the end of the output of python script [closed]

拈花ヽ惹草 提交于 2020-07-22 22:15:58
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . Improve this question Why is a percent sign at the end of the output of the python script? $ echo "TEST TEST" | trim TESTTEST% #!/usr/bin/env python import sys if __name__ == "__main__": for line in sys.stdin: sys.stdout.write(''.join(line.split())) 回答1: The % you see there might actually be your

Percent sign at the end of the output of python script [closed]

大兔子大兔子 提交于 2020-07-22 22:14:39
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 4 years ago . Improve this question Why is a percent sign at the end of the output of the python script? $ echo "TEST TEST" | trim TESTTEST% #!/usr/bin/env python import sys if __name__ == "__main__": for line in sys.stdin: sys.stdout.write(''.join(line.split())) 回答1: The % you see there might actually be your

shell script relative position from the file

余生长醉 提交于 2020-07-22 06:06:11
问题 I have almost no idea about shell scripts or commands in linux I have a project named projectx projectX happens to be in users/hardik/desktop/projectx I have created a shell script start.sh . This is the content of shell script echo "Starting typescript build in new terminal.." osascript -e 'tell application "Terminal" to do script "npm run build"' sleep 3 echo "Starting firebase functions...." osascript -e 'tell application "Terminal" to do script "firebase emulators:start --only functions"'

How to execute an InDesign extendscript from command line?

北慕城南 提交于 2020-07-18 07:38:10
问题 I need to execute a .jsx script for InDesign from command line (Windows). For Illustrator, it works easily with the following command: "C:\Program Files\Adobe\Adobe Illustrator CS6 (64 Bit)\Support Files\Contents\Windows\Illustrator.exe" "...\myscript.jsx" Both applications Illustrator and ExtendScript Toolkit CS6 open then the script is automatically launched. When I try the same for InDesign, it doesn't work (InDesign says 'Unable to open myscript.jsx ...'). I also tried to launch

Is there a nice way of handling multi-line input with GNU readline?

ⅰ亾dé卋堺 提交于 2020-07-17 05:38:45
问题 My application has a command line interface, and I'm thinking about using the GNU Readline library to provide history, an editable command line, etc. The hitch is that my commands can be quite long and complex (think SQL) and I'd like to allow users to spread commands over multiple lines to make them more readable in the history. Is it possible to do this in readline (maybe by specifying a difference between a newline and an end of command)? Or would I be better off implementing my own