Convert XML to text: java -cp findbugs.jar edu.umd.cs.findbugs.PrintingBugReporter -txt analysisResult.xml >output.txt Union bugs: java -cp findbugs.jar edu.umd.cs.findbugs.workflow.UnionResults -output out.xml input1.xml input2.xml ... ...
In line one: What is '' file? According to help read, that '' is an argument to the -d parameter: -d delim continue until the first character of DELIM is read, rather than newline In line six: What does the empty space do in < < (find). There are...
linux,bash,shell,unix,command-line
Parsing UNIX command-line options in general is not possible in a schemaless manner, especially when supporting GNU conventions (ie. allowing intermixing between options and arguments). Consider the usage you gave here: my-script -x ex --y=why zebra Now, should this be: {options: {x: "ex", y: "why"}; arguments=["zebra"]} ...or should it be......
Here is quick solution using grep: grep -vwE "(<<<<<<< HEAD|=======|>>>>>>> master)" input > output I assume that the file containing the source code with Git markers is called input and the above command will generate the file output with all the markers removed. Note that Git wisely chose very bizarre...
When you set the classpath, you removed the current directory which is where the md2html.class file is located. scala -classpath "..\jsoup-1.8.2.jar:.:" miscellaneous.markdown.md2html C:\Users\Dici\Desktop\fancy-examples\test\test.md --theme apple The classpath seperator for windows is ; and linux is :. The . is shorthand for the current directory. It might be better to give...
python,python-2.7,batch-file,command-line,pipe
sys.argv is for command line parameters (id.py a b c). To read from a pipe, you need to use sys.stdin.read() in id.py. Edit: See also: http://stackoverflow.com/a/7608205/478656...
The command line should appear exactly as it would if you typed it at the command prompt (verify by Wscript.Echo sEXE): sEXE = """C:\Windows\system32\RunDll32.exe"" InetCpl.cpl,ClearMyTracksByProcess 255" ...
Sed should do that: sed -i~ -e 's/:\([0-9]\{1,\}\)/:\1_suffix/g' file ^ ^ ^ ^ ^ ^ | | | | | | start capture | | end | globally, i.e. not just the first group | | capture | occurrence on a line any digit | the first capture one or...
java.exe is attached to the current running command shell or the batch script that launched it. javaw.exe will start it as a separate windows program without that attachment. Using javaw is approximately the same as running java -jar xyz.jar & on Linux.
c#,visual-studio,visual-studio-2012,command-line,windows-installer
You've asked with a Windows Installer tag, so if we are talking about products installed from MSI files: Attempt 1 is incorrect because Windows Installer doesn't use the uninstallstring to uninstall products (change it and see if it makes a difference), and there are better ways. 2 uses WMI, and...
ruby-on-rails-4,command-line,console
You can use Hero.where('id MOD(2)!=0').destroy_all ...
windows,batch-file,command-line,scripting,command-prompt
Basically, in batch you first enter the command to be excuted, and then supply the arguments. Each command can be seen as an own small programm. you are calling the command xcopy and supply those five arguments to it. A documentation can be found here: https://technet.microsoft.com/de-ch/library/cc771254.aspx?f=255&MSPPError=-2147217396 you can also type...
If I understand what you're trying to do correctly, then t timeline harryguinness -l -n 1 | awk '{print $1}' | xargs -I ID t reply ID "This is a test" should work. The -I ID option tells xargs to replace ID with the token read from stdin instead of...
for /f "TOKENS=* delims=" %a in ('wmic PROCESS where "commandline '%myname%' and name ='java.exe'" get processid /format:value') do (set "%a" >nul) set proc try like this....
Well, you found a bug in the way the C# compiler deals with having to output text to the console when it is switched to UTF-8. It has a self-diagnostic to ensure the conversion from an UTF-16 encoded string to the console output code page worked correctly, it slams the...
You cannot simply "continue" some script you started by opening a ssh connection on the remote side. Those are two completely separate processes. What you can do is push a local script into a remote shell you initiate by opening the ssh connection: ssh [email protected] 'bash -s' < local_script.sh This...
git,command-line,merge,diff,interactive
git checkout --patch selects diff hunks, simplest here might be to put your content at the upstream path, do that, and clean up after: cp config config.example git checkout -p upstream config.example mv config.example config git checkout @ config.example that will get you the two-diff hunk selection from git add...
osx,bash,command-line,terminal
PATH is a special case, because it's going to be overridden by almost any default set of dotfiles. You'll need to review your user's ~/.bashrc, ~/.profile, etc. However, if I run: hello=world open -a Terminal . ...and in that terminal, run echo "$hello" ...the environment variable is successfully propagated through....
windows,powershell,command-line,exif,exiftool
You'll probably have to go to the command line rather than rely upon drag and drop as this command relies upon ExifTool's advance formatting. Exiftool "-SerialNumber<001-001-0001-${filesequence;$_=sprintf('%04d', $_+1 )}" <FILE/DIR> If you want to be more general purpose and to use the original serial number in the file, you could use...
Put the python files in a folder and then put this folder into an installation directory (may be in /usr/local/foldername). Use chdir in script/s to change directory to the file containing folder (may be os.path.dirname(os.path.realpath(sys.argv[0]))) to import dependencies from there, or use absolute path. Now make a symbolic link...
I will explain cat /etc/dsh/machines.list | sed -e "s|\(.*\)|cp run.sh \1/|" to you and rest all are same. 1) cat will read lines from machines.list and pass that to sed. 2) sed is doing basically a match and replace operation. | is used as a separator, it could be any...
windows,batch-file,command-line,text-files
If the input file is large, this method should run faster because it does not check all the lines. It also correctly process lines with special Batch characters. @echo off setlocal EnableDelayedExpansion rem Read the first line, and create a dummy previous "endLine" with same name set /P "endName=" <...
python,python-2.7,python-3.x,command-line,pip
Based on your error log, the main issue is that apt-get is interpreting your attempt to install separate packages with the comma as part of the name of python-dev. To install multiple packages with apt-get just separate them with a space. However, based upon the continued discussion in the chat...
ruby,pdf,command-line,ubuntu-14.04,pdfbox
1. Extracting text: pdftotext -layout the.pdf - Extract all pages' text to <stdout>. pdftotext -layout -nopgbrk the.pdf the-3-5.txt Extract all pages' text to file the.txt, and don't insert these pesky ^L characters signifying new pages. pdftotext -f 3 -l 5 -layout the.pdf - Extract pages' 3--5 text to the-3-5.txt. 2....
java,windows,command-line,classnotfoundexception
You have add the JAR to the CLASSPATH, not the folder which contains this JAR. So the -cp argument should something be like this C:\Users\ANNA\Downloads\SimplifiedConnectionProvider.jar;C:\Users\ANNA\Downloads\Windows64_Libjitsi\the_name_of_the_JAR.jar.
java,command-line,command-prompt
If the program uses a batch to start, then add this line before the start of the program: SET JAVA_HOME="C:\Program Files\Java7\Java.exe" (This is just an example, the directory might be different on your computer) If the program does not use such a batch (you can recognize it because it ends...
Read about spaces in URL and percent encoding. However, % has special meaning in Windows CLI and cmd batch files... Read 8.3 file name creation on NTFS partitions. You could see 8.3 filenames using dir /X supposing those are enabled for a particular volume. However, it will work on local...
linux,command-line,installation,command-line-arguments,updates
You can download the hardware specific package of ubuntu 12.04 directly http://releases.ubuntu.com/12.04/ or http://howtoubuntu.org/how-to-install-ubuntu-12-04-precise-pangolin There is no such option in the standard installation medium....
bash,command-line,echo,osx-mavericks
When you do echo "password" | md5, echo adds a newline to the string to be hashed, i.e. password\n. When you add the -n switch, it doesn't, so only the characters password are hashed. Better to use printf, which does what you tell it to without needing any switches: printf...
There are two ways to execute an external file on your database: 1. From the command line 2. From within the MySQL client First, to identify which application you are using (The DOS command line, or the MySQL client application), look at your prompt. When you are within the MySQL...
python,linux,command-line,terminal,arguments
It should be sys.argv[1] not sys.argv[0]: filearg = sys.argv[1] From the docs: The list of command line arguments passed to a Python script. argv[0] is the script name (it is operating system dependent whether this is a full pathname or not). If the command was executed using the -c command...
This solution creates lots of temp files, but cleans up after. # put each paragraph into it's own file: awk -v RS= '{print > sprintf("%s_%06d", FILENAME, NR)}' data.txt # now, join them, and align the columns join data.txt_* | column -t | tee data.txt.joined # and cleanup the temp files...
The closest you can come in bash is to define foo as a function: foo(){ date +'%H-%M-%S'; } and then you can write ./WriteOutputTo Output_$(foo) Other shells have mechanisms to accomplish this. For example, in ksh you could define the "get" discipline function for foo: foo.get() { .sh.value=$(date +'%H-%M-%S'); }...
linux,bash,shell,command-line,tee
Hard coded solutions tee Echo nothing and simple send it to multiple files using the tee command. Like this: $ echo -n | tee file1 file2 file3 file4 file5 All files in that list will be empty and created if they don't exist. Applied to your answer this would be:...
r,command-line,packages,rscript
For future references, you could use function require instead of library to avoid this error: require just returns FALSE and raises a warning if the package is not installed instead of throwing an error. You can therefore do a construct as follows: if(!require(ggplot2)){install.packages("ggplot2")} What it does is trying to load...
bash,shell,curl,command-line,pipe
Try this: curl --silent "www.site.com" > file.txt ...
find can do that. Just add -delete: find . -name ".DS_STORE" -delete ...
python,command-line,command-line-arguments,argparse,optparse
Using argparse subcommand parsers p = argparse.ArgumentParser() subparsers = p.add_subparsers() option1_parser = subparsers.add_parser('option1') # Add specific options for option1 here, but here's # an example option1_parser.add_argument('param1') option1_parser.set_defaults(func=do_option1) option2_parser = subparsers.add_parser('option2') # Add specific options for option1 here option2_parser.set_defaults(func=do_option2) option3_parser = subparsers.add_parser('option3') # Add specific options for option3 here...
Try the following command: C:\SSProject> java -cp "path/to/your/jar/testng.jar:path/to/your/test_classes" org.testng.TestNG testng.xml If your testng.xml is not in C:\SSProject than give the full path to the testng.xml. SO user Patton has explained this very nicely here - How to run TestNG from DOS Prompt Updated: For windows user, following command worked -...
powershell,command-line,command-line-arguments
powershell.exe -file "myfile.ps1" — that means: start PowerShell and execute file myfile.ps1 (file name considered to be relative to current directory) in global scope. powershell.exe -command "myfile.ps1" — that means: start PowerShell and execute command myfile.ps1, and PowerShell allows you to execute script files by typing their names in command...
To suppress the output of the function end result, you need to also put a semicolon in the caller, not only in the function itself y=f(x); To display a variable value without the 'ans=' use something like disp(['v = ' num2str(v)]) or simply disp(v) ...
shell,command-line,command-line-interface,backslash,apache-commons-cli
As you are trying to provide this when invoking the application in the shell, this is actually related to how the shell handles such special characters, not commons-cli or Java. The bash shell (which is the default shell on most unix/linux versions nowadays) has the special syntax $'\t' for this,...
The :r! command always works 'likewise', so it will not be able to insert any text inside a given line. You can assign the command's results into a 'register' (vim's places to hold characters yanked, cut, etc) using: :let @a=system("your_command") and then place the contents of the register (your passed)...
java,grails,command-line,ide,ggts
The reason is that dynamic scaffolding is not yet implemented in Grails 3.x.
linux,bash,shell,command-line,diff
If you are already diffing two specific directories, then I assume you know their names. In this case all you need to determine dynamically is the list of sub-directories contained in each. Assuming you are in a parent directory; you have a structure like so, and you want to diff...
No, you cannot use two with arguments in a single line. But in your case this isn't necessary, because the yerrorbars style also plots the points: set xrange [0:1] set samples 11 plot '+' using 1:1:($1*0.1) with yerrorbars pt 5 In general one can combine different plotting styles by appending...
Look for build outputs under the app module. app/build/outputs/...
python,linux,command-line,tcp,pipe
Would pipes and stdin work? Here is a similar question just asked a couple minutes ago. Reading from linux command line with Python...
c++,netbeans,command-line,ant,compilation
I want to do that automatically via Windows command line, how can I do that? NetBeans uses Makefile-based projects as default for C/C++ projects, so you can use make to build your project: cd <Project dir> make It's also possible to build other make-targets (eg. make all or make...
curl,command-line,exchange-server,imap
You're connecting insecurely. Try the imaps protocol, or enable STARTTLS.
regex,bash,perl,replace,command-line
replace %20 after last forward slash of href attributes of non .jpg links You can use the following to match: %20(?=(?:(?!\.jpg">)[^>\/])*>) And replace with - See DEMO...
linux,bash,command-line,alias,io-redirection
Right, I fixed it, as I suspected there was a wrinkle I was missing: exec /bin/login I needed exec to hand control over to /bin/login rather than just call it. So the telnet daemon is started thusly: /usr/sbin/telnetd -l /usr/sbin/not_really_login The contents of the not-really-login script are: #!/bin/sh echo -n...
command-line,command,echo,command-prompt
Your command should be: echo hello world > %userprofile%\Desktop\hello_world.txt It doesn't work if you put anything before %userprofile%, because it's a full path, so C:\Users\%userprofile%\Desktop\hello_world.txt gets substituted to C:\Users\C:\Users\cromix\Desktop\hello_world.txt....
windows,batch-file,command-line
FOR %i in ("*.war") do rmdir /q /s %~ni will work in the command line but not in a batch. Inside a batch file you must replace %i with %%i. This should be it.
David's answer is a good one, assuming you want to do a full git clean. Here is another option that lets you delete the files individually: Let your shell complete the file names for you, escaping them as necessary. For example, if you type rm path_to_file1 and press Tab, most...
java,android,linux,command-line,root
try this code : try { Process process = Runtime.getRuntime().exec("ls"); BufferedReader bufferedReader = new BufferedReader( new InputStreamReader(process.getInputStream())); StringBuilder result=new StringBuilder(); String line = ""; while ((line = bufferedReader.readLine()) != null) { result.append(line); } TextView tv = (TextView)findViewById(R.id.textView1); tv.setText(result.toString()); } catch (IOException e) {} ...
You could try the below grep command. grep -oPr '\bclassName\.\K\w+(?=\()' \K discards the previously matched chars from printing at the final....
python,linux,shell,command-line
You need to read stdin from the python script. import sys data = sys.stdin.read() print 'Data from stdin -', data Sample run - $ date | python test.py Data from stdin - Wed Jun 17 11:59:43 PDT 2015 ...
The code needs to be placed inside of BEGIN block: gawk 'BEGIN { for (i = 1; i <= 1000; i++) print "begin\""i"\"text"i"end" >> "path/to/output.txt" }' ...
command-line,terminal,quotes,double-quotes,cp
You need quotes if you don't want the shell expanding the arguments, but instead want the argument passed through verbatim to whatever program you're trying to run. See, for example, the following program: #include <stdio.h> int main (int argc, char *argv[]) { printf ("Argument count = %d\n", argc); for (int...
batch-file,for-loop,command-line,cmd,variable-expansion
Why FOR works different than ECHO is because the batch parser (cmd.exe) has special parsing rules for FOR, IF and REM. Therefore delayed expansion doesn't work for the parameters here, only for the arguments inside the parenthesis. Only percent expansion works for the parameters, as the parser executes the percent...
ls | awk '{ system("mv " $0 " " substr($0,1,3) "20" substr($0,8,2) "-" substr($0,4,2) "-" substr($0,6,2) substr($0,10,6))}' run the above from the dir the files are in. You should be able to figure out whats going on, so no other comment....
Use the -print0 option to find and the corresponding -0 option to xargs: find . -name '*.txt' -print0 | xargs -0 wc You can also use the -exec option to find: find . -name '*.txt' -exec wc {} + ...
command-line,path,grep,dos,findstr
Reading FINDSTR Output in the comprehensive List of undocumented features and limitations of FINDSTR by Dave Benham aka dbenham: ... When printed, the fileName will always include any path information provided. Additional path information will be added if the /S option is used. The printed path is always relative to...
linux,bash,command-line,escaping
It is safer to use BASH arrays for storing full or partial command lines like this: params=(-A 'Foo' -B 'Bar') then call it as: ./test "${params[@]}" which will be same as: ./test -A 'Foo' -B 'Bar' ...
javascript,node.js,command-line
If you turn db.js into a module you can require it from db_init.js and just: node db_init.js. db.js: module.exports = { method1: function () { ... }, method2: function () { ... } } db_init.js: var db = require('./db'); db.method1(); db.method2(); ...
bash,perl,command-line,awk,sed
In awk awk -F, 'NF==1{a=$0;next}{print a","$0}' file Checks if the number of fields is 1, if it is it sets a variable to that and skips the next block. For each line that doesn't have 1 field, it prints the saved variable and the line And in sed sed -n...
c#,command-line,console-application,args,command-line-parsing
I have written a helper method for me along time ago, which extracts the value of a swtich or returns if present or not - this will help you maybe. /// <summary> /// If the arguments are in the format /member=value /// Than this function returns the value by the...
Use -passin pass as shown below. openssl x509 -req -in client.csr -signkey client.key -passin pass:clientPK -CA client-ca.crt -CAkey client-ca.key -passin pass:secret <-- try this -CAcreateserial -out client.crt -days 365 ...
Usually, path environments (%windir%, %temp%, etc) uses backslashes (\). try modifying your arguments to use backslashes instead of slashes (\"%WIX% \ bin \ heat.exe\"...
java,android,windows,command-line
Turns out I only needed to compile the resources separately. LIke this // COMPILES THE LIBRARY CLASS. package -f -m --auto-add-overlay -S "C:\Users\Brian\AppData\Local\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\res" -J "C:\Users\Brian\Documents\output\Temp\android\src" -M "C:\Users\Brian\AppData\Local\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib\AndroidManifest.xml" -I...
c++,command-line,ffmpeg,offset
If you're working on linux you might pipe your ffmpeg input file through dd and skip to a specific offset. Something like: > dd if=myfile.mp2 skip=<myoffset-in-block-size> ibs=<block-size> | ffmpeg -i pipe:0 ... or prepare another input file for ffmpeg without piping. If you're working under windows, you can use MSys...
This worked for me- drive list | grep -w " 2015 " | grep -Eo '^[^ ]+' ...
command-line,xcodebuild,build-settings
The setting name is actually GCC_DYNAMIC_NO_PIC. "Generate Position-Dependent Code" is just the description.
shell,command-line,awk,terminal
If order is not important, join and awk can do the job easily. $ join <(sort input.txt) <(sort mapping.txt) | awk -v OFS="|" '{for (i=3;i<NF;i++) print $2, $i OFS}' 103823054|001| 103823044|011| 103823044|012| 103823044|013| 103823064|011| 103823064|012| 103823064|013| ...
windows,batch-file,command-line
Try this : REM if SqlCmd command is successful run the below if exist statement if "%ERRORLEVEL%"=="0" ( REM if the file exists then delete and exit: if exist "D:\Temp\database.bak" ( del "D:\Temp\database.bak" exit /B ) else ( REM if the file doesn't exist, exit with error code 1: echo...
logging,command-line,vbscript,zip,winzip
As @CheranShunmugavel pointed out in a comment to another answer the knowledge base article refers to the WinZip Command Line utility. If you want to work with WinZip on the command line I strongly recommend you get that add-on, even though the regular WinZip executable does support some basic command...
I think the permissions I mentioned in the comment should be fine, but if you want to be sure everything is set at its default, you can uninstall Homebrew using this script and then reinstall it from scratch. You can also follow this advice for resetting the permissions....
For XCOPY this would do the job: xcopy mydir temp\mydir /s /i If mydir is missing below temp it will be created as a directory (/i). /s copies subdirectories You might want to mix any of the parameters xcopy offers, for example /e, /k - but this depends on what...
javascript,loops,firefox,command-line,imacros
Use only one file "TodaysEvents.js". And let it be like this: const L = "\n"; iimPlayCode("TAB T=1" + L + "URL GOTO=http://www.event.com/schedual" + L); for (i = 1; i < 130; i++) { iimSet("loop", i); iimPlayCode("SET !ERRORIGNORE YES" + L + "TAG POS={{loop}} TYPE=A ATTR=TXT:02 EXTRACT=HTM" + L + "SAVEAS...
git,github,command-line,software-distribution
All Releases are tied to Git tags. You can either choose an existing tag, or let GitHub create a new tag from an existing branch when the Release is created. You can create releases and attach one or more artifacts (e.g., your binaries) via the GitHub API; see the docs...
In cmd.exe you can do the following: for /f "tokens=1-3,* delims=," %i in (tst.txt) do @if %k GTR 0 echo %i,%j,%k,%l Almost, what you tried, but a few changes: ... do @if ..// The @ will disable echo of the command itself ... tokens=1-3,* // the first three tokens will...
mongodb,command-line,meteor,user-accounts
meteor mongo db.users.find({username: "someusername"}) // ensure that your query returns the correct user that you want to remove db.users.remove({username: "someusername"}) ...
bash,shell,command-line,concatenation,command-line-interface
Assuming that the number of minutes should be an integer rather than a string: my_cli --json '{"minutes" : '"$(( ( ( $(date +%s) - 18000 ) % 86400 ) / 60 ))"' }' ...
The text file Rar.txt is the user's manual for console version Rar.exe. The second and third paragraph in Introduction chapter at top of this file are: RAR supports only RAR format archives, which have .rar file name extension by default. ZIP and other formats are not supported. Even if you...
linux,shell,command-line,awk,sed
Almost same as the other answer, but printing 0 instead of blank. AMD$ awk -F, 'NR>1{a[$2]+=$3;b[$2]++} END{for(i in a)print i, a[i], b[i]}' File pear 1 1 apple 2 3 orange 0 1 peach 0 1 Taking , as field seperator. For all lines except the first, update array a. i.e...
batch-file,command-line,cmd,registry,right-click
Sdelete doesn't have a pause command. You'll need to run it with a program that doesn't exit so console stays open. See cmd /? eg cmd /k forfiles or cmd /c forfiles & pause ...
Try changing <xsl:variable name="filename"><xsl:value-of select="functx:substring-before-if-contains(base-uri(),'.xml')" /></xsl:variable> <xsl:result-document href="{$filename}.arxml"> to <xsl:variable name="filename" select="functx:substring-before-if-contains(tokenize(base-uri(), '/')[last()],'.xml')" /> <xsl:result-document href="{$filename}.arxml"> ...
linux,bash,shell,command-line,find
If you can use the -regex option, avoiding subfolders with [^/]: ~$ find . -type f -regex ".*name1/[^/]*" -o -regex ".*name2/[^/]*" ./structure/of/dir/name2/file1.a ./structure/of/dir/name2/file3.c ./structure/of/dir/name2/subfolder ./structure/of/dir/name2/file2.b ./structure/of/dir/name1/file1.a ./structure/of/dir/name1/file3.c ./structure/of/dir/name1/file2.b ...
windows,batch-file,command-line,conditional-statements,xcopy
I don't understand what the lowest numbered folder has to do with the recently added files, but I'll assume you know what you are doing. You imply you want to copy the recently added files, so you don't want the XCOPY /T option. I've added the /I option so that...
node.js,command-line,osx-yosemite
After all, I found the solution to my problem. As my node script file has been created on Windows, the file is DOS format (line endings in DOS format I think). So, I used a module which allow to converting a file to a unix format : brew install dos2unix...
System.Environment.CommandLine gives you access to the complete unescaped command line, and you are free to process that however you like. But unless you plan to implement a full-blown parser in your app, this is not going to be a reliable approach, and it's unlikely you will be able to reliably...
css,twitter-bootstrap,command-line,gulp,bower
Like @topleft mentioned, it was error in the syntax from using multiple files in my gulp.src. To use multiple sources you need to put them in an array. Example: var gulp = require('gulp'); var concat = require('gulp-concat'); gulp.task('default', function() { return gulp.src(['foo/*', 'bar/*']) .pipe(concat('result.txt')) .pipe(gulp.dest('build')); }); ...
I'm not exactly sure what you mean, but I think you want something like this, where the () brackets store the number and the $1 replaces it back. perl -pi -w -e 's/src="(\d+)/src="http:\/\/website.com\/$1/g’ file.tsv And you can avoid the so-called 'leaning toothpick syndrome by selecting a different delimiter for the...
find $DELDIR -type f | xargs cp /dev/null where $DELDIR is the name of the directory to start in. The -type f option targets only files, not directories. And of course xargs just finishes off cp /dev/null with the file names from each line of find output....