command-line

How to fix: error: '<filename>' does not have a commit checked out fatal: adding files failed when inputting “git add .” in command prompt

风流意气都作罢 提交于 2020-04-12 18:03:26
问题 I'm trying to add a ruby rails file to my repository in gitlab but it somehow wouldn't allow me to add the file saying that my file does not have commit checked out. I've tried git pull, making the the file again and git adding but still wont work error: '172069/08_lab_routes_controllers_views_172069_172188-Copy/adventure_game/' does not have a commit checked out fatal: adding files failed 回答1: If you have a subdirectory with a .git directory and try to git add . you will see this message.

What's the difference between -cp and -classpath

让人想犯罪 __ 提交于 2020-04-08 09:30:10
问题 What's the difference between using javac -cp classes helloworld.java and javac -classpath classes helloworld.java in CMD? 回答1: They are the same, check http://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html -classpath classpath -cp classpath Specifies a list of directories, JAR files, and ZIP archives to search for class files. Separate class path entries with semicolons (;). Specifying -classpath or -cp overrides any setting of the CLASSPATH environment variable. If

How to package all my functions in a batch file as a seperate file?

折月煮酒 提交于 2020-04-07 18:49:32
问题 My question is related to this question. I have several bunch of actions that need to be executed from a batch file and I would like to model them as functions and call from a master sequence. From the above question, it is clear that I can do this with the call syntax call:myDosFunc My question is that can I place all these functions in a seperate batch file (functions.bat) and somehow 'include' that in the main batch file and call them? Another option would be to utilize the possibility to

How to package all my functions in a batch file as a seperate file?

ぐ巨炮叔叔 提交于 2020-04-07 18:48:31
问题 My question is related to this question. I have several bunch of actions that need to be executed from a batch file and I would like to model them as functions and call from a master sequence. From the above question, it is clear that I can do this with the call syntax call:myDosFunc My question is that can I place all these functions in a seperate batch file (functions.bat) and somehow 'include' that in the main batch file and call them? Another option would be to utilize the possibility to

How to package all my functions in a batch file as a seperate file?

妖精的绣舞 提交于 2020-04-07 18:48:28
问题 My question is related to this question. I have several bunch of actions that need to be executed from a batch file and I would like to model them as functions and call from a master sequence. From the above question, it is clear that I can do this with the call syntax call:myDosFunc My question is that can I place all these functions in a seperate batch file (functions.bat) and somehow 'include' that in the main batch file and call them? Another option would be to utilize the possibility to

Find and replace text in a file between range of lines using sed

眉间皱痕 提交于 2020-04-04 14:05:12
问题 I have a big text file (URL.txt) and I wish to perform the following using a single sed command: Find and replace text 'google' with 'facebook' between line numbers 19 and 33. Display the output on the terminal without altering the original file. 回答1: You can use SED's range selector for that: sed '19,33{s/google/facebook/}' file This will run the substitution on lines between 19 (exclusive) and 33 (inclusive) Note this will only replace the first occurrence of google on each line, you can

Find and replace text in a file between range of lines using sed

橙三吉。 提交于 2020-04-04 14:03:45
问题 I have a big text file (URL.txt) and I wish to perform the following using a single sed command: Find and replace text 'google' with 'facebook' between line numbers 19 and 33. Display the output on the terminal without altering the original file. 回答1: You can use SED's range selector for that: sed '19,33{s/google/facebook/}' file This will run the substitution on lines between 19 (exclusive) and 33 (inclusive) Note this will only replace the first occurrence of google on each line, you can

Extract Links Within Specific Folder in AWS S3 Buckets

守給你的承諾、 提交于 2020-03-25 16:01:04
问题 I am trying to get my AWS S3 API to list objects that I have stored in my S3 buckets. I have successfully used the code below to pull some of the links from my S3 buckets. aws s3api list-objects --bucket my-bucket --query Contents[].[Key] --output text The problem is the output in my command prompt is not listing the entire S3 Bucket inventory list. Is it possible to alter this code so that the output on my CLI lists the full inventory? If not, is there a way to alter the code to target

How to set environment variable within GDB using shell command?

人走茶凉 提交于 2020-03-21 16:04:25
问题 I want to run gdb with only a single variable MyVar in its environment. However, the variable's contents are rather complex, containing non-printable ASCII, and so is best set using e.g. MyVar=$(python -c 'print("\xff...")') . I'm left with two options: Set the MyVar in bash before running gdb . Then inside gdb , remove all other environment variables individually using unset environment NAME ( very tedious! ). Clear all environment variables using unset environment . Then inside gdb , set

How to set environment variable within GDB using shell command?

穿精又带淫゛_ 提交于 2020-03-21 16:01:27
问题 I want to run gdb with only a single variable MyVar in its environment. However, the variable's contents are rather complex, containing non-printable ASCII, and so is best set using e.g. MyVar=$(python -c 'print("\xff...")') . I'm left with two options: Set the MyVar in bash before running gdb . Then inside gdb , remove all other environment variables individually using unset environment NAME ( very tedious! ). Clear all environment variables using unset environment . Then inside gdb , set