I have a test file as below [in reality its a very big file], which needs some more fields to be populated randomly :
requirement 1) I need to insert 3 columns with random date values [format yyyymmdd] inside one test file.
Condition:
A. These 3 new random date fields should be inserted only if the total number of the columns are more than 3.
B. These new columns should be insert in the position of 5,6,7 in test file.
C. I need to insert a flag value 'Y' or 'N' as new position 9. [if possible 'Y' for some lines and 'N' for some lines randomly]
Shell script, sed, awk or perl any thing is OK for me to achieve this tough work. Any help will be much appreciated.
Thanks,
Lokesh
Last edited by Lokesha; 09-19-2013 at 07:02 PM..
Reason: Correction - changed flag to 'Y' from 'J'.
Hi,
I have an excel file that have a random count of columns/fields and what im trying to do is to only retrieve all the rows under 2 specific field headers.
I can use the usually command for awk which is awk 'print{ $1 $2}' > output.txt, but the location of the 2 specific field headers is... (9 Replies)
Hello all,
I have these 2 files
File1
123 100
456 200
789 300
File2
|1|2|3||4|5||6|
|1|2|3||4|5||6|
|1|2|3||4|5||6|
I need an output like :
|1|2|3|123|4|5|100|6|
|1|2|3|456|4|5|200|6|
|1|2|3|789|4|5|300|6| (3 Replies)
I am relatively new to this forum and Unix scripting.
ksh script:
part 1 :will call a PL\SQL program will create 3 CSV file at the unix directory.
part 2 : will sftp the files to the EFT server.
Once the EFT server receives these file , it will transfer them to a shared windows folders.
... (3 Replies)
Trying in this forum. Not sure if it is permitted.... but in need of help.
Please find the requirements in the below link.
https://www.unix.com/unix-dummies-questions-answers/191503-add-extra-commas-csv-file-2.html#post302665179
Thanks in Advance. (1 Reply)
Hi ,
Based on my previous requirement the code works fine for comma as delimiter.
Now my Req is widened up a bit ..
There will be two set of files .. one with comma as delimiter and other with semi-colon ; as delimiter.
Second Sample file.
With Double Quotes (Semi-Colon... (1 Reply)
Hi All,
I got this requirement to process a complex CSV file.
Eg File.
Line 1: Name:,XYz
Line 2: Age:,15
Line 3: Grade:,7
Line 4:
Line 5: English, Maths, Science,Spanish
Line 6:10,11,13,14
As you can see the maximum column is 4 . The file i need to make is
Line 1: Name:,XYz,,... (12 Replies)
hi
I have a csv file with few rows
> cat job_stat
1,jobname1,somthing,somthing
2,jobname2,somthing,somthing
3,jobname3,somthing,somthing
4,jobname4,somthing,somthing
I want to add few columns after the 2nd column and then append rest of the columns after the 3rd newly added... (3 Replies)
Hi,
i have a csv file which have headers and values of it like below :
headers --> CI Ref SerialNumber LastScanDate
values --> VMware-42,VMware-42,Tue, 20 May 2014 11:03:44 +0000
i want to have a above csv in below format :
headers --> CI Name CI Description CI Ref... (6 Replies)
Hi,
I have a file of csv data, which looks like this:
file1:
1AA,LGV_PONCEY_LES_ATHEE,1,\N,1,00020460E1,0,\N,\N,\N,\N,2,00.22335321,0.00466628
2BB,LES_POUGES_ASF,\N,200,200,00006298G1,0,\N,\N,\N,\N,1,00.30887539,0.00050312... (10 Replies)
Hello Experts,
I got a requirement i have a input file which am getting from different source,Now i want to add extra 3 columns to this file like BASE,ACTUAL and DATE.
Input File Looks like
QUAL CHGE TYP LAW COM1 COM2
A 1 X SED HO ASE
B 3 Z CDE SE ... (5 Replies)
Discussion started by: ahmed.vaghar
5 Replies
LEARN ABOUT DEBIAN
getc_putc
getc_putc(8) System Manager's Manual getc_putc(8)NAME
getc_putc - program to test hard drive performance.
SYNOPSIS
getc_putc [-d dir] [-s size(KiB)] [-m machine-name] [-u uid-to-use:gid-to-use] [-g gid-to-use]
DESCRIPTION
This manual page documents briefly the getc_putc, program.
This is a simple adjunct to the bonnie++ benchmark. It is used to test various ways of doing IO one byte at a time, usually you don't need
to do enough of this for it to be a performance issue for it to matter much which way you do it. But sometimes it's necessary (for example
whan parsing IO from a terminal and then launching another process which will take over all IO, such as a simple shell).
The real benefits of this are to help settle some arguements about the performance of such things, and to educate novices about how bad
per-byte IO really is.
OPTIONS
For getc_putc every option is of the form of a hyphen followed by a letter and then the next parameter contains the value.
-d the directory to use for the tests.
-s the size of the file for byte IO performance measured in kilobytes. NB You can specify the size in mega-bytes if you add 'm' to the
end of the number.
The default for this test is to test with a 40MiB file. Of the file only 1/32 of it will be used for write() and read() system
calls (anything else takes too long), and only 1/4 of it will be used for locked getc() and putc().
-m name of the machine - for display purposes only.
-u user-id to use. When running as root specify the UID to use for the tests. It is not recommended to use root, so if you really
want to run as root then use -u root. Also if you want to specify the group to run as then use the user:group format. If you spec-
ify a user by name but no group then the primary group of that user will be chosen. If you specify a user by number and no group
then the group will be nogroup.
-g group-id to use. Same as using :group for the -u parameter, just a different way to specify it for compatibility with other pro-
grams.
-q quiet mode. If specified then some of the extra informational messages will be suppressed. Also the csv data will be the only output
on standard out and the plain text data will be on standard error. This means you can run getc_putc -q >> file.csv to record your
csv data.
OUTPUT
The primary output is plain-text in 80 columns which is designed to fit well when pasted into email and which will work well with Braille
displays.
The second type of output is CSV (Comma Seperated Values). This can easily be imported into any spread-sheet or database program.
For every test the result is a speed in KiB/s. I do not display the CPU time because it presumably is 99% of the power of a single CPU (or
something very close to that).
AUTHOR
This program, it's manual page, and the Debian package were written by Russell Coker <russell@coker.com.au>.
The documentation, the Perl scripts, and all the code for testing the creation of thousands of files was written by Russell Coker, but the
entire package is under joint copyright with Tim Bray.
SIGNALS
Handles SIGINT and does a cleanup (which may take some time), a second SIGINT or a SIGQUIT will cause it to immidiately die.
SIGXCPU and SIGXFSZ act like SIGINT.
Ignores SIGHUP.
AVAILABILITY
The source is available from http://www.coker.com.au/bonnie++ .
See http://etbe.coker.com.au/category/benchmark for further information.
SEE ALSO
bonnie++(8), zcav(8)getc_putc(8)