Sponsored Content
Full Discussion: Transpose a txt file
Top Forums Shell Programming and Scripting Transpose a txt file Post 302942525 by RudiC on Wednesday 29th of April 2015 12:23:36 PM
Old 04-29-2015
I'm absolutely not sure why you tear apart my two commands and then complain it wouldn't work.
To prove it works, try smaller but representative sample files.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Binary txt file received when i use uuencode to send txt file as attachment

Hi, I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes.. i wanna attach a text file and send to a mail id..used the following code : uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com it works... (2 Replies)
Discussion started by: ash22
2 Replies

2. Shell Programming and Scripting

AWK CSV to TXT format, TXT file not in a correct column format

HI guys, I have created a script to read 1 column in a csv file and then place it in text file. However, when i checked out the text file, it is not in a column format... Example: CSV file contains name,age aa,11 bb,22 cc,33 After using awk to get first column TXT file... (1 Reply)
Discussion started by: mdap
1 Replies

3. Shell Programming and Scripting

command to list .txt and .TXT file

Hi expersts, in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log I want list only .txt and .TXT files in one command... how to ?? //purple (1 Reply)
Discussion started by: thepurple
1 Replies

4. Shell Programming and Scripting

Transpose a file

input IndID ID1 ID2 ID3 a1 a/a b/b c/c a2 a/a b/b c/c a3 a/b b/b c/d a6 a/b b/b c/e a8 a/a b/c c/e a9 b/b b/d c/e output IDName IndID IDtype C_No ID1 a1 a/a 1 ID1 a2 a/a 1 ID1 a8 ... (1 Reply)
Discussion started by: stateperl
1 Replies

5. Shell Programming and Scripting

awk append fileA.txt to growing file B.txt

This is appending a column. My question is fairly simple. I have a program generating data in a form like so: 1 20 2 22 3 23 4 12 5 43 For ever iteration I'm generating this data. I have the basic idea with cut -f 2 fileA.txt | paste -d >> FileB.txt ???? I want FileB.txt to grow, and... (4 Replies)
Discussion started by: theawknewbie
4 Replies

6. Shell Programming and Scripting

Need to append the date | abcddate.txt to the first line of my txt file

I want to add/append the info in the following format to my.txt file. 20130702|abcd20130702.txt FN|SN|DOB I tried the below script but it throws me some exceptions. <#!/bin/sh dt = date '+%y%m%d'members; echo $dt+|+members+$dt; /usr/bin/awk -f BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Discussion started by: harik1982
6 Replies

7. Shell Programming and Scripting

To transpose columns + edit in a txt file

Hi, I have a txt file that looks like log2FoldChange Ontology_term 8.50624450251828 GO:0003700,GO:0003707,GO:0005634,GO:0006355,GO:0043401,GO:0003700,GO:0005634,GO:0006355,GO:0008270,GO:0043565 7.03936870356684 GO:0005515,GO:0008080 6.49606183738682 6.49525073909629 GO:0005515... (4 Replies)
Discussion started by: alisrpp
4 Replies

8. Windows & DOS: Issues & Discussions

2 Questions: replace text in txt file, add text to end of txt file

so... Lets assume I have a text file. The text file contains multiple "#" symbols. I want to replace all thos "#"s with a STRING using DOS/Batch I want to add a certain TEXT to the end of each line. How can I do this WITHOUT aid of sed, grep or anything linux related ? (1 Reply)
Discussion started by: pasc
1 Replies

9. Shell Programming and Scripting

Desired output.txt for reading txt file using awk?

Dear all, I have a huge txt file (DATA.txt) with the following content . From this txt file, I want the following output using some shell script. Any help is greatly appreciated. Greetings, emily DATA.txt (snippet of the huge text file) 407202849... (2 Replies)
Discussion started by: emily
2 Replies

10. Programming

[Python] replicating "sha256 -C checksum_file.txt file.txt"

Hello everyone, Since my python knowledge is limimted, I've challenged myself to learn as much as possible to help me with my carrere. I'm currently trying to convert a shell script to python, just to give myself a task. There is one section of the script that I'm having issues converting and... (2 Replies)
Discussion started by: da1
2 Replies
App::Prove(3pm) 					 Perl Programmers Reference Guide					   App::Prove(3pm)

NAME
App::Prove - Implements the "prove" command. VERSION
Version 3.26 DESCRIPTION
Test::Harness provides a command, "prove", which runs a TAP based test suite and prints a report. The "prove" command is a minimal wrapper around an instance of this module. SYNOPSIS
use App::Prove; my $app = App::Prove->new; $app->process_args(@ARGV); $app->run; METHODS
Class Methods "new" Create a new "App::Prove". Optionally a hash ref of attribute initializers may be passed. "state_class" Getter/setter for the name of the class used for maintaining state. This class should either subclass from "App::Prove::State" or provide an identical interface. "state_manager" Getter/setter for the instance of the "state_class". "add_rc_file" $prove->add_rc_file('myproj/.proverc'); Called before "process_args" to prepend the contents of an rc file to the options. "process_args" $prove->process_args(@args); Processes the command-line arguments. Attributes will be set appropriately. Any filenames may be found in the "argv" attribute. Dies on invalid arguments. "run" Perform whatever actions the command line args specified. The "prove" command line tool consists of the following code: use App::Prove; my $app = App::Prove->new; $app->process_args(@ARGV); exit( $app->run ? 0 : 1 ); # if you need the exit code "require_harness" Load a harness replacement class. $prove->require_harness($for => $class_name); "print_version" Display the version numbers of the loaded TAP::Harness and the current Perl. Attributes After command line parsing the following attributes reflect the values of the corresponding command line switches. They may be altered before calling "run". "archive" "argv" "backwards" "blib" "color" "directives" "dry" "exec" "extensions" "failures" "comments" "formatter" "harness" "ignore_exit" "includes" "jobs" "lib" "merge" "modules" "parse" "plugins" "quiet" "really_quiet" "recurse" "rules" "show_count" "show_help" "show_man" "show_version" "shuffle" "state" "state_class" "taint_fail" "taint_warn" "test_args" "timer" "verbose" "warnings_fail" "warnings_warn" "tapversion" "trap" PLUGINS
"App::Prove" provides support for 3rd-party plugins. These are currently loaded at run-time, after arguments have been parsed (so you can not change the way arguments are processed, sorry), typically with the "-Pplugin" switch, eg: prove -PMyPlugin This will search for a module named "App::Prove::Plugin::MyPlugin", or failing that, "MyPlugin". If the plugin can't be found, "prove" will complain & exit. You can pass an argument to your plugin by appending an "=" after the plugin name, eg "-PMyPlugin=foo". You can pass multiple arguments using commas: prove -PMyPlugin=foo,bar,baz These are passed in to your plugin's "load()" class method (if it has one), along with a reference to the "App::Prove" object that is invoking your plugin: sub load { my ($class, $p) = @_; my @args = @{ $p->{args} }; # @args will contain ( 'foo', 'bar', 'baz' ) $p->{app_prove}->do_something; ... } Note that the user's arguments are also passed to your plugin's "import()" function as a list, eg: sub import { my ($class, @args) = @_; # @args will contain ( 'foo', 'bar', 'baz' ) ... } This is for backwards compatibility, and may be deprecated in the future. Sample Plugin Here's a sample plugin, for your reference: package App::Prove::Plugin::Foo; # Sample plugin, try running with: # prove -PFoo=bar -r -j3 # prove -PFoo -Q # prove -PFoo=bar,My::Formatter use strict; use warnings; sub load { my ($class, $p) = @_; my @args = @{ $p->{args} }; my $app = $p->{app_prove}; print "loading plugin: $class, args: ", join(', ', @args ), " "; # turn on verbosity $app->verbose( 1 ); # set the formatter? $app->formatter( $args[1] ) if @args > 1; # print some of App::Prove's state: for my $attr (qw( jobs quiet really_quiet recurse verbose )) { my $val = $app->$attr; $val = 'undef' unless defined( $val ); print "$attr: $val "; } return 1; } 1; SEE ALSO
prove, TAP::Harness perl v5.18.2 2014-01-06 App::Prove(3pm)
All times are GMT -4. The time now is 05:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy