remove the first line of a csv file under windows using cmd command - csv

I need to remove the first line of a csv file under
windows
using
cmd
command
The file size is around 1GB

Using CMD for such large file sizes is not the most efficient.
Also, there is no direct command that lets us edit files on the go (such as vi in linux).
You can, however, exclude the first X lines from a file & copy it to a new file using:
more +X [file_containing data] > [file_to_export_data_to]
Source: Extract N lines from file using single windows command

Related

How to view a CSV file in a windows command prompt itself?

The linux command for viewing csv file in terminal is:
cat filename.csv
What i use in a windows command prompt for the same thing
I can open the csv file in excel through cmd but i can't view it in the cmd.
I searched a lot and couldn't get..
For simply viewing a file, use the more command for better control, and it works on both Linux and Windows.
In Windows, in the command prompt you can simply use the type syntax to display the csv file content:
c:\>type [filename.csv]

how to get header file in csv file in jmeter?

I have created the script in GUI MODE and running the script in not GUI mode and it generates the CSV file but it is not adding header file in the CSV file. How to add it?
just add -f in your code in GUI mode after moving to the bin folder
Here is the code:
jmeter -f -n -t"templates\Lucene_search1.jmx" -l "templates\Lucene_Search_Results_Data1.csv" -e -o"C:\Starting Python\apache-jmeter-5.0\HTML_Reports"
Make sure to add the next line to user.properties file:
jmeter.save.saveservice.print_field_names=true
Also be aware that if you're appending the results into the existing file - JMeter will not add field names to it, you will either need to delete the existing results file and re-run the test or redirect the output into a new file and copy header and the new results from the new file into the old file manually.
References:
Results file configuration
Apache JMeter Properties Customization Guide

MySQL Workbench Model Cannot open document file git

I am trying to open a MySQL workbench file (*.mwb) but getting the following error as per the 2nd screenshot...is there a way to restore this file?
Cannot open document
Cannot open document file: No Error
My files are in git but checking out older versions doesn't seem to work...I strongly believe it is something related to the line endings of the file as when I commit files I get the message from git along the lines of...
CRLF will be replaced by LF in file x
Unfortunately I don't have any *.bak files in the same directory so can't restore it from that
I've also tried opening the file with 7zip and winrar, I can see an XML in there but get errors when trying to view it
My .gitattributes file is currently set as follows:
# Autodetect text files
* text=auto
# Force the following filetypes to have unix eols, so Windows does not break them
*.* text eol=lf
# (binary is a macro for -text -diff)
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
I tried adding the following, deleting and checking out the file but it didn't work
*.mwb binary

Running MySQL from Windows 7 command line

I want to run a brief MySQL script from the Windows 7 command line. The command line text I am using looks like:
C:\> C:\my path\mysql\bin\mysqld-nt --init-file=C:\\mysql-script.txt
The problem is that I am getting the following error message in the Windows 7 command line:
C:\my is not recognized as an internal or external command, operable program or batch file
I have researched this online, but the solutions center around setting a new Windows environmental variable. I do not think I should create an environmental variable called 'my'. So what else can I do in order to run mysqld-nt from the Windows 7 command line?
It is important that MySQL not be running when I do this, so I need to call it from the Windows 7 command line and not use the MySQL command line client.
You have a space between "my" and "path".
Try:
"C:\my path\mysql\bin\mysqld-nt" --init-file=C:\\mysql-script.txt
You need the quotes to wrap any directory structure containing a space.
The answer is right in the error:
C:\my is not recognized as an internal or external command, operable
program or batch file
What is C:\my path? Is that really your file system path?
If so, your command would be; note the quotes to keep "my path" together:
"C:\my path\mysql\bin\mysqld-nt" --init-file=C:\\mysql-script.txt
But more likely, my path should be the actual file system path on your Windows 7 install.

Copy file in windows 7 using Tcl command

How can use Tcl command in windows-7 ? I want to copy one file to other locaiton using a .bat file.
How can use Tcl command in windows-7 ?
Windows (of all versions) has never come with a Tcl interpreter pre-installed, By far the simplest way is to get a copy of ActiveTcl installed.
Once you've got that installed, either run it interactively and just type your Tcl command in at the prompt, or use a text editor (like Notepad) to make a file (conventionally with extension .tcl) that contains the command or commands to execute; you'll probably be able to make the file run by just double-clicking on it.
I want to copy one file to other locaiton using a .bat file.
That's not really got much to do with Tcl. With Tcl, you would use:
file copy {C:\Where\To\Copy\From.txt} {C:\Where\To\Copy.to}
Note, we've put the filenames in {curly braces} here so that we can use backslashes; if we weren't doing that, we'd need to use double-backslashes instead (\\) or forward slashes (/).
The alternative, if you're really wanting to use a .bat file, is to look up what the cmd.exe commands COPY and (less likely) XCOPY do. But that's not a Tcl question.