Sponsored Content
Full Discussion: duplicating a line
Top Forums UNIX for Dummies Questions & Answers duplicating a line Post 302671211 by Scrutinizer on Friday 13th of July 2012 08:56:56 AM
Old 07-13-2012
Sure:
Code:
awk '
 1                            # Perform the default action: {print $0} (print the line)
 $1==3{                       # if the first field equals 3
   print RS s                 # then print a newline and print string "s"
  }
' s=" 3b ccc ccc ccc" infile  # set string "s" to the desired value

This User Gave Thanks to Scrutinizer For This Post:
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

duplicating 1st row of data

Hi, I have data in the following format: data1 data2 data3 data4 data5 data6 data7 data8 data9 data10 I require the final output to be: data1 data1 data1 data1 i only require the 1st line but I need to replicate it in n rows where n is the number of rows where data... (4 Replies)
Discussion started by: ReV
4 Replies

2. Post Here to Contact Site Administrators and Moderators

Sorry for duplicating posts

SORRY FOR DUPLICATING POSTS, COULD U JUST REMOVE THE FIRST ONE. Thank u. (1 Reply)
Discussion started by: vrguha
1 Replies

3. HP-UX

duplicating ignite tapes

I have a B180L controller running HP-UX 10.2 with an internal DDS2 tape drive and an external Surestore DDS (24gb) tape drive. I want to make duplicate copies of ignite tapes from one tape drive to another. What is the best way to do this? (1 Reply)
Discussion started by: garyb
1 Replies

4. UNIX for Dummies Questions & Answers

remove duplicating lines

Hi, i have a webserver logfile and want to count how many page views there have been. I was thinking about removing lines that begin with the same user and same date&time, because it indicates they were just looking at one page and multiple hits were counted. My question is how do I do this?... (6 Replies)
Discussion started by: JudithBorg
6 Replies

5. Red Hat

Duplicating ethernet speed

Hi guys, Suppose you have a server with two ethernet cards (1GB each) and each cards are connecting to two different switches cisco 3750. My question is: How can I setup my server's network interfaces to increase the throughput up to 2GB? is it possible? If not, do you know another way to up... (3 Replies)
Discussion started by: iga3725
3 Replies

6. UNIX for Dummies Questions & Answers

Duplicating MAC linux or net?

hi guys I have a IBM eServer BladeCenter HS12 with Linux Red Hat 5.4 installed on it, it is using Bonding. ifcfg-bond0 DEVICE=bond0 BOOTPROTO=none ONBOOT=yes TYPE=Ethernet IPADDR=x.x.x.x NETMASK=x.x.x.x GATEWAY=x.x.x.x USERCTL=no IPV6INIT=no PEERDNS=no BONDING_OPTS="miimon=80... (1 Reply)
Discussion started by: karlochacon
1 Replies

7. Shell Programming and Scripting

mv duplicating directories

Hi Folks, I've put together a script for sorting my backup files into sub folders to be run from a cron job. Each file is named username.tar.gz and the file /etc/trueuserowners contains all users and their owner in the format "user: owner". The script works fine identifying users and their owners... (10 Replies)
Discussion started by: beddo
10 Replies

8. Shell Programming and Scripting

Duplicating and changing sh file

Hello, I have a file named file_1.sh that I want to duplicate into file_2.sh, file_3.sh,..., etc. I also need to change the text within each file so that it would fit the file name. For example, in file_1.sh there is a command to save some output as 'output_1.txt', and also there is an input... (3 Replies)
Discussion started by: haguyw
3 Replies
App::Prove::State::Result::Test(3)			User Contributed Perl Documentation			App::Prove::State::Result::Test(3)

NAME
App::Prove::State::Result::Test - Individual test results. VERSION
Version 3.28 DESCRIPTION
The "prove" command supports a "--state" option that instructs it to store persistent state across runs. This module encapsulates the results for a single test. SYNOPSIS
# Re-run failed tests $ prove --state=failed,save -rbv METHODS
Class Methods "new" Instance Methods "name" The name of the test. Usually a filename. "elapsed" The total elapsed times the test took to run, in seconds from the epoch.. "generation" The number for the "generation" of the test run. The first generation is 1 (one) and subsequent generations are 2, 3, etc. "last_pass_time" The last time the test program passed, in seconds from the epoch. Returns "undef" if the program has never passed. "last_fail_time" The last time the test suite failed, in seconds from the epoch. Returns "undef" if the program has never failed. "mtime" Returns the mtime of the test, in seconds from the epoch. "raw" Returns a hashref of raw test data, suitable for serialization by YAML. "result" Currently, whether or not the test suite passed with no 'problems' (such as TODO passed). "run_time" The total time it took for the test to run, in seconds. If "Time::HiRes" is available, it will have finer granularity. "num_todo" The number of tests with TODO directives. "sequence" The order in which this test was run for the given test suite result. "total_passes" The number of times the test has passed. "total_failures" The number of times the test has failed. "parser" The underlying parser object. This is useful if you need the full information for the test program. perl v5.16.3 2013-05-02 App::Prove::State::Result::Test(3)
All times are GMT -4. The time now is 08:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy