For example i have a file named 1.txt which contains:  Windows 7 Windows 8 Windows 8.1 Windows 10   and 2.txt which contains:  2009 2012 2012 2014   and I want to echo 2.txt into 1.txt like this:  Windows 7     2009 Windows 8     2012 Windows 8.1   2012 Windows 10    2014   How can I make it happen?
120653
cat file1  foo ice two   cat file2  bar cream hundred   Desired output:  foobar icecream twohundred   file1 and file2 will always have the same amount of lines in my scenario, in case that makes things easier.
6111
I have a file that contains file names. For example:  /tmp/list.txt (it is with the spaces at the start of each line):     /tmp/file.log   /app/nir/home.txt   /etc/config.cust   I want, using one line, to move all the files listed in /tmp/list.txt to /app/dest  So it should be something like this:  cat /tmp/list.txt | xargs mv /app/dest/
97970
I have file like this called a.txt:  [2016-03-30T04:51:51.599-04:00]!ER_DEV!Port_Conflict!/u05/app/ [2016-01-20T04:30:21.885-04:00]!ER_DEV!Port_Conflict!/u05/app/   I need to modify it so it looks like:    2016-03-30 04:51:51!ER_DEV!Port_Conflict!/u05/app/   2016-01-20 04:30:21!ER_DEV!Port_Conflict!/u05/app/   i already wrote a command to change [2016-03-30T04:51:51.599-04:00] to 2016-03-30 04:51:51 .but how to append the query output to original file.    awk -F'!' '{print $1}' a.txt | awk -F '[T.]' '{print $1 " " $2}' | awk '{gsub(/\[/,"")}1'
114942
I'm trying to combine two different files, one called itemnum and another called items.   itemnum contains:  ItemNumber 1201 1221 1320 1340 1410   and items contains:  Item Lobby Furniture Ballroom Specialties Poolside Carts Formal Dining Specials Reservation Logs   I want to use join here right? So that the output looks like this:  ItemNumber:Item 1201:Lobby Furniture 1221:Ballroom Specialties 1320:Poolside Carts 1340:Formal Dining Specials 1410:Reservation Logs   I can't even figure out how to get them to join, let alone add the :  I tried join itemnum items &gt; prodinfo, but that just gives me an empty file.
120897
Say I have three files (template_*.txt):   template_x.txt template_y.txt template_z.txt   I want to copy them to three new files (foo_*.txt).    foo_x.txt  foo_y.txt  foo_z.txt   Is there some simple way to do that with one command, e.g.   cp --enableAwesomeness template_*.txt foo_*.txt
93418
I symplified my problem: @echo off set res=  for /f &quot;usebackq&quot; %%f in (`find &quot;a&quot; list.txt`) do set res=%%f echo %res%  pause&gt;nul and that things.txt file in the code is like:  list.txt file in the code is: apple pitch pear melon mango  As you expect, the result of this code is mango  because the line 'mango' is located below the line 'apple' and 'pear' But the result I want is apple  or pear  Specifically, I want to put each of the other values above mango such as apple and pear into the variable res using option keys provided. is there any way to do that?
94844
I have a file1.txt  USA Joe 123.123.123 Russia Marry 458.786.892 Canada Greg 151.844.165 Latvia Grace 125.895.688   and file2.txt  1 123.123.123 2 151.844.165 3 465.879.515   and I want to create a new file result.txt where I print my only those lines that adresses (xxx.xxx.xxx) are both  in file1 and file2 so my result should be  USA Joe 123.123.123 Canada Greg 151.844.165   I need to use awk, but how I need to use it for both files?
70098
I'm trying to get a regex that will match:  somefile_1.txt somefile_2.txt somefile_{anything}.txt   but not match:  somefile_16.txt   I tried  somefile_[^(16)].txt   with no luck (it includes even the "16" record)
25249
I realized I had named a bunch of files in an off-by-one fashion so I wanted to rename any file starting with "1" to the same thing except starting with 2.  For example mv 1.4.5.txt 2.4.5.txt or mv 1-chart.jpg 2-chart.jpg etc.  I tried mv 1* 2* but this was not accepted because it interprets 2* as a directory.
15297
How can I write the same content to many text files by using cat or echo in only one command?  For example I want to write "hello" to file1 and file2. I tried:   echo "hello" &gt;&gt; file1 file2   but it didn't work. How can I do it?
83439
I have a directory full of files with names in this format (with numbers as the start of each filename):  102_file.txt 104_list.txt 242_another_file.txt   I would like to rename them as follows (i.e. removing the numbers):  file.txt list.txt another_file.txt   Can anyone suggest a way to do this (presumably from the terminal)?
91679
I've got many, many mp3 files that I would like to merge into a single file.  I've used the command line method  copy /b 1.mp3+2.mp3 3.mp3   but it's a pain when there's a lot of them and their namings are inconsistent.  The time never seems to come out right either.
32956
I have two files in  file A, there are sequence_numbers in the other file B, there are many columns, and the first column is sequnce numbers, I want to get a files with all the lines in the B with the sequence numbers which are in the A how can I achieve this? thanks  like file A  1 3 8 9 20   file B  1 kfjk 3243424 2 fkdkf 23543592 3 iefjk 21493402 7 dlafdl 23435231 8 kfkdlkf 309834
104748
Right now I'm using echo &quot;Hello World&quot; &gt;&gt; file.txt  to append some text to a file but I also need to add text below a certain string let's say [option], is it possible with sed? EG: Input file Some text Random [option] Some stuff  Output file Some text Random [option] *inserted text* Some stuff
101232
I have a text file with 9 fields separated by :  survey:m1111771::rent:travel:::Morning:   How do I pull field 1 and 8 only to a separate file  for example it would look like this,  survey:Morning
111525
I have a filename in a format like:     system-source-yyyymmdd.dat   I'd like to be able to parse out the different bits of the filename using the "-" as a delimiter.
10068
I need to move files by reading their names. I have to move system generated files and the names include a time stamp. I need to move the files by reading the file name by month.  If the file name contains 201601*.txt, then move to 2016/January directory. If the file name contains 201602*.txt then move to 2016/February directory etc.