General :: Concatenate Data From Different Lines?

Mar 1, 2011

I want to concatenate info from different lines from iptables.for exmaple, in my firewall using iptables I have this information.

pkts bytes target prot opt in out source destination
0 ACCEPT all -- * * 192.168.1.3 0.0.0.0/0
5 248 ACCEPT all -- * * 0.0.0.0/0 192.168.1.3

[code]...

View 1 Replies


ADVERTISEMENT

General :: Concatenate 2 Command Into One Line

Oct 13, 2010

I'm trying to concatenate two command in one line.

Below are the commands:

Code:

I wanted to list all files in /portal/apll/nad/send and grep only .tmp files that contains credit card word.

View 2 Replies View Related

General :: Concatenate And Labeling Files ?

May 5, 2010

I have an assignment question that I have been making no progress on.

I need a single line command to concatenate a group of files together and clearly label those files in the output.

I assume that just cramming a bunch of commands onto one line will not be considered OK.

and it has to work on some old version of Solaris (which I have been having trouble with normal commands not working the same all day on), but if you just have solutions for any normal Linux shell at least I would have an idea of what I am looking for.

I have looked though cat's man page up and down and I am pretty sure it cannot do what I want, and cannot seem to find any other commands that even concatenate a grouping of files together.

View 4 Replies View Related

General :: Concatenate Two Variables With Underscore?

Jun 4, 2010

I have question regarding concatenation of two variables with underscore.i.e. (bourne shell)

Code:
# var1=123
# var2=456

[code]...

View 3 Replies View Related

General :: How To Concatenate Rows Of 2 Files

Apr 3, 2011

How can i concatenate rows of 2 files.

File1:

File2:

How want file3 to be like?

View 14 Replies View Related

General :: Possible To Concatenate *.flv Flash Video Files?

Oct 12, 2010

Have got a film broken up into 10 minute chunks a la ...... Tried cat file1.flv file2.flv > file1&2.flv but mplayer stopped, saying 'end of file', half way through playing file1&2.flv.

Is there some way to join them together into one, so the film may be played all the way through.

Just occurred to me you could use an * for the counting numeral in the filename e.g. mplayer file*.flv for file1.flv, file2.flv, etc..

View 2 Replies View Related

General :: Concatenate Two Files With A New Line Character Between Them

Sep 1, 2010

I am trying to concatenate two files with a carriage return.

Iam not sure how we can implement this using .sh script.

For ex:

I tried concatenating using:

I got an output like:

View 4 Replies View Related

General :: Concatenate Variable Names In Bash?

Apr 7, 2011

In my script, and I would like to concatenate 2 variables names, to give me the true variable.I've 3 variables X1, X2 and X3, and I invoked them inside a for loop.

Code:
#!/bin/bash
X1=HELLO

[code]....

View 4 Replies View Related

General :: Concatenate Two Environment Variables In Bash?

Nov 9, 2010

How do I concatenate two environment variables in bash?

View 3 Replies View Related

Programming :: Randomly Selecting 160 Lines Within A Data Set Of 1000 In Perl

Apr 11, 2011

I have a dataset of around 1000 lines. Out of these 1000 lines I need to pick randomly 160 lines of data and write it to a file. The program is needed to eliminate data bias when I run the program through a reanalysis program. I am thinking I need to use the rand or srand term, but I am having difficulty writing this in perl. I have to write it in perl, because the rest of my scripts for this project are in perl, so consistency is important. The data only consists of one column of the data (YYYYMMDDHHHH).

View 2 Replies View Related

Programming :: Add Blank Lines Whenever The Value Of A Given Column Alters In A Data File?

Jan 7, 2011

All I want is a command that reads one data file with several columns and prints it in another one.However, whenever the value in one specific column alters, it prints one empty line in the new file. For example, consider the file

2.54000000 2.54000000
2.54000000 2.54000000
2.54000000 2.54000000
2.54000000 2.56000000

[code]....

View 9 Replies View Related

General :: Accidentally Type Concatenate Large File On Remote System

May 6, 2010

Every once in a while on a computer I'm ssh'd into, I will accidentally type "cat largefile.txt" and my screen will start rushing with text for the next 10 minutes. I'm always working in a screen session, so my current solution is to just log out and then log back in, and since it can go 100X faster when I'm logged out, it'll finish in the short time it takes me to type my password in again. Is there a better way? Either involving the fact I'm in a screen session? Or a way to do this within SSH? What doesn't work: detaching from the screen session (doesn't respond until file is done outputting) trying command to move to a different window in the screen session (also doesn't respond) typing ctrl+C to kill cat command (also doesn't respond, probably because the command is done and the buffers just have to catch up).

View 3 Replies View Related

OpenSUSE :: Partial Loading Of Data Followed By Broken Up Multiple Lines Due To Firefox Or Not

Apr 20, 2011

Viewing any source on the Web results in partial loading of data followed by broken up multiple lines. It is occurring now with this post. Paging down I get three lines of "submit new thread" until at the bottom are multiple lines (no characters) after "forum rules". I put it to my network provider who cannot come up with any idea of what may cause it. It cannot be the hardware as the same condition exists on two PC's. Both are on 11.2.

View 1 Replies View Related

General :: Delete All Lines Containing A String, Plus 4 Lines Below It?

Jan 26, 2010

I've come across an unusual requirement for a service in my Ubuntu system.Simply put, I need to find a way to search for all instances of a term in a file, delete lines containing containing that term, and delete four lines below each instance of that term. ither that, or copy the entirety of a file to a new file and skip over all lines containing the term plus four below it.This sounds kinda weird, I know. Without going too far into detail, I either have to change the logfile format for a server I'm running which is a huge pain in the butt, or I can just run a script to edit an HTML report generated from said logs. (Said report is really just for managers to peruse, and I like my log format, so I'm pursuing option 2.)

View 4 Replies View Related

General :: Printing From Bash Shell / Concatenate Files Into One File With File Names Included?

May 11, 2011

I am supposed to take some small files, and print them to a specific printer, such that the small files are concatenated into one file. The file name has to be included in the file that gets printed.

Should I be looking to concatenate the files into one file with the file names included, and then print them?

something like: -printfunction -printername < file*

View 7 Replies View Related

General :: Concatenate Several Images Into A PDF File With Several Images Per Page

May 2, 2011

I know that ImageMagick's convert program can be used as follows to convert a collection of images -- say, in PNG format -- to a PDF file:

convert *png output.pdf

The problem with this is that each image is then stretched to fit on one page, whereas I would like to keep the original dimensions of the images and put as many as possible on one page in the PDF file before moving on to another page.

View 1 Replies View Related

OpenSUSE :: Web - Screen Loads And After Initial First Few Lines Breaks Up Into Multiple Repetitions Of Lines

Apr 22, 2011

I have been experiencing a problem where the screen loads and after initial first few lines breaks up into multiple repetitions of lines. Reloading helps but has to be repeated when pageing down. Mail is no problem; it is supplied by my network provider. OS is openSUSE 11.2 which I update when advised. Below is a sample from the error console:

[Code]...

View 1 Replies View Related

Ubuntu :: Wobbly Windows Lines - Get These Lines When Drag/move The Window Upwards

May 31, 2011

I've just installed Kubuntu 11.04, switched on wobbly windows effect. It runs very smooth on my Nvidia GeForce 7600 GS with dual screen twinview turned on. However, I get these lines when I drag/move the window upwards - see screenshot:

View 6 Replies View Related

Programming :: Remove Lines And Parts Of Lines From Python Strings?

Nov 24, 2009

How do you remove parts of strings using python? Such as, if I have something like:

Code:
erme1 sdifskenklsd
erme2 sdfjksliel

[code]....

View 3 Replies View Related

General :: Replace Several Lines In A File With Other Lines In Another File?

Oct 26, 2009

I have this massive table file with some data in it and I want to replace some lines that are wrong with the correct ones that are in another table file of the same format. The wrong lines are not all together in a block but randomly distributed so I need to make a loop checking if the line is in the other file and if it is, replace it. I want to try and do it with sed or awk but I don't really know how to....

View 12 Replies View Related

Programming :: Concatenate File Sort By Date?

May 5, 2010

i have text file that filename contain the date of creation (i.e 2010.05.02.log).I would like to create a script that:-Ask for start date -Ask for end date- Concatenate all file on the requested period by date order.

View 1 Replies View Related

Programming :: Concatenate The Output To Comma Delimited?

Nov 23, 2010

I would like to create csv output from an ipcalc calculation.

Code:
[me@host scripts]$ ./ipcalc 192.168.30.40/255.255.255.248
Address: 192.168.30.40 11000000.10101000.00011110.00101 000

[code]....

View 1 Replies View Related

Programming :: Python Can't Concatenate 'str' And 'NoneType' Objects?

Jun 24, 2010

I cannot get this to work

Code:
#!/usr/bin/python
# -*- coding: iso-8859-1 -*-
import re
# @description "This is a describing text about the file currently documentet";
#DocC documentation prototype

[Code]...

View 4 Replies View Related

Programming :: Change To Lower Case And Concatenate The First And Last Names?

Nov 28, 2010

I have a file like below. For all the lines (except for the ones listed as 'Unknown Owner' and N/A') I would like to change to lower case and concatenate the first and last names.Before:

Code:
aaa.bbb.ccc.ddd,Unknown Owner
ddd.eee.fff.ggg,N/A
hhh.iii.jjj.kkk,John Doe
aaa.bbb.ccc.ddd,Mary Jane

[Code]...

View 4 Replies View Related

General :: Mount: /dev/mapper/gegevens-Data Already Mounted Or /data Busy

Jul 14, 2010

A few months ago I have setup a server with three hard disks. The partition mapping the disks as follows:

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x7ca36fee

[code]....

Now I have the following problem the LVM file system don't mount properly.If I open the mount point I see only a few files of the LVM disk. If I want to unmount the disk I get the following error:

umount /data/
umount: /data/: not mounted

If I want to mount the volume I get the following error:

mount -a
mount: /dev/mapper/gegevens-Data already mounted or /data busy

View 3 Replies View Related

Ubuntu Multimedia :: Video Editing Software To Concatenate Mpg Files?

May 14, 2011

I searched a bit, but got overwhelmed by what I got.

I have a number of mpg files which I would like to concatenate to each other so I get one big file. I know how to do this with the cat command code...

View 1 Replies View Related

General :: Awk Group 2 Lines ?

Jul 15, 2011

I have a file with n number of lines where every 2 lines are grouped.

So I want to print the items in a line and the next line in a single line.

For example:

I can print the line and the adjacent together and print the required items like this:

But that's not the order I want. How can I get it printed like below:

View 1 Replies View Related

General :: Why Does AWK Split Lines Into Two

Aug 5, 2010

when I run the following command:

awk -F, '{print $10 "," $5 "," $1 "," $3 "," $4 "}' myfile > tmpfile

tmpfile displays the lines but they are all cut off and placed on the line below at the same point.

View 1 Replies View Related

General :: Deleting Several Lines In Vim?

Mar 5, 2011

I've a big text, and I would like to delete several lines in vim. I was thinking in doing that with marks, but I can't do it. Below it's an example text and I want to delete from <FROM HERE> to <TO HERE>. How can I do that?
[Quote] .....

View 3 Replies View Related

General :: How To Use Find With Two Lines Together

Jan 19, 2010

I am trying to search for

Code:
<cats>
Sports
</cats>

how do i use the find command to search for <cats>Sports The problem here is that the word Sports is in the next line of <cats> so I cant use -

Code:
find /test/upload/ -type f -name "*.xml" -exec grep -l "<cats>Sports" {} ; -print
How do I put the next line string?

View 8 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved