Sponsored Content
Top Forums Shell Programming and Scripting Moving Content from one file to another with variables Post 302390241 by royarellano on Wednesday 27th of January 2010 10:16:37 AM
Old 01-27-2010
Thanks all; that works, but it puts the content on a single line, what if i wanted it to continue down a single column (new line).

file1
a
b
c

file2
d
e
f

var=`cat file1 file2`
echo $var

DESIRED RESULTS: fileX
a
b
c
d
e
f

Feedback?

---------- Post updated at 09:16 AM ---------- Previous update was at 08:56 AM ----------

NEVERMIND! LOL;

I was viewing it wrong. It does it properly; thank you all. Solution works.

v/r
Roy Arellano
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Put content of file into variables

How to put a line of strings (with some white spaces in between) from a file into variables? I have tried the following codes. However, the content is cut by space (not by line) for i in `cat ${source_file}` do echo $i done Please comment. Thanks. (2 Replies)
Discussion started by: Rock
2 Replies

2. Shell Programming and Scripting

file moving based on file content

Hi All my scenario is as follows... I have the following three files in directory alphabet, containing the respective character string... Filename Character String alphabet01.dat AAA alphabet02.dat BBB alphabet03.dat CCC based on... (12 Replies)
Discussion started by: melvyn.cochrane
12 Replies

3. Shell Programming and Scripting

comparing content of 2 variables in script

hello how can i compare the content of two variables using the if or for loops. I have 2 variables which was formed as result of commands pass into them but i want to now compare the 2 contents and echo where their is a match for examples variable1=`cat file2` variable2=`cat file3` if #... (5 Replies)
Discussion started by: sam4now
5 Replies

4. Shell Programming and Scripting

moving variables to another variable as a new avriable

Somehow I can't get it for this basic bash problem. maybe someone can help. What I try to do is: a="world" b="hello" how can I move this into $c so that I can replace "helloworld" with "world hello" in sed like: sed "s/\helloworld/ ${c}... I tried several combinations but all with... (4 Replies)
Discussion started by: lowmaster
4 Replies

5. Shell Programming and Scripting

list file content as individual variables

Hello, I've created a couple of files within a list using the command "ls -ltr | tail -2 > list" These files are the newest files placed within a directory. From the "list" file, I need to place the filenames as a variable. In which the newest file will be called "new_ctrl" the older file... (4 Replies)
Discussion started by: petersf
4 Replies

6. Shell Programming and Scripting

Help needed in perl; moving or copying the variables

Hi All, I have a perl script blc.pl; i have five variables a,b,c,d and e in this script. Now I want to copy the values of these variables into a data file,say abc.dat.. Can anybody please tell me how to do this? Any help is appreciated.. Thanks in advance (2 Replies)
Discussion started by: puneetkanchi
2 Replies

7. Shell Programming and Scripting

Comparing content of two variables

I have very abstract need of "comparing two variables" and take subsequent actions. please refer to image below https://lh3.googleusercontent.com/-frNk5iA3q1c/TjI3lE0sWOI/AAAAAAAAAIE/fxzB1w07gas/script_block.JPG I have a part of script which reads a file and generates variables based on... (4 Replies)
Discussion started by: animesharma
4 Replies

8. Shell Programming and Scripting

Moving files from one directory to another based on 2 date variables

Hi All, I am currently coding for a requirement(LINUX OS) where I am supposed to move a file (Lets Call it Employee.txt) from Directory A to Directory B based on 2 date fields as below, Date_Current = 20120620 Date_Previous = 20120610 Source Directory : /iis_data/source Target... (11 Replies)
Discussion started by: dsfreddie
11 Replies

9. Red Hat

Moving of file content to another two files after searching with specific pattern

Hello, Please help me with this!! Thanks in advance!! I have a file named file.gc with the content: 1-- Mon Sep 10 08:53:09 CDT 2012 2revoke connect from FR2261; 3delete from mkt_allow where grantee = 'FR2261'; 4grant connect to FR2261 with '******'; 5alter user FR2261 comment... (0 Replies)
Discussion started by: raosr020
0 Replies

10. Shell Programming and Scripting

Script for moving one file with date content in name

Dear All, I am having a database that generates daily backup files in the below format. abc_date_0010.zip. Can you please suggest a method to copy the last day's file to another location. I am trying with if statement, but having difficulty while I use the condition like if ; then ... (4 Replies)
Discussion started by: skooby
4 Replies
MojoMojo::Schema::Result::Content(3pm)			User Contributed Perl Documentation		    MojoMojo::Schema::Result::Content(3pm)

NAME
MojoMojo::Schema::Result::Content - Versioned page content DESCRIPTION
This table stores the actual page content; in other words, it's a table of page versions (revisions). It has a composite primary key "(page, version)", where "page" is the id of a page, and "version" is its version number. Each version has a content "body", a "status" ("released" or "removed"), and a "release_date". Revisions that have been replaced by a newer revision have a "remove_date" and a "comments" set to "Replaced by version x.". The "type", "abstract" and "precompiled" columns are for future use. "created" is essentially equal to "release_date" (there can be a 1-second difference), and is used externally by other modules and in templates. "release_date" and "remove_date" are used internally. COLUMNS
page References MojoMojo::Schema::Result::Page. creator References MojoMojo::Schema::Result::Person. METHODS
highlight Returns an HTML string highlighting the changes between this version and the previous version. The changes are in "<span>" or "<div>" tags with the class "fade". formatted_diff <context> <old_content> Compare this content version to <old_content>, using Algorithm::Diff. Sets a "diffins" CSS class for added lines, and a "diffdel" CSS class for deleted lines. The "<ins>" and "<del>" HTML tags are also used. formatted Return the content after being run through MojoMojo::Formatter::*. merge_content Show the merge conflict of the content for two different edit sessions of the same page. max_version Return the highest numbered revision. previous Return the previous version of this content, or undef for the first version. pub_date Return the publishing date of this version in a format suitable for RSS 2.0. store_links Extract and store all links and wanted paged from a given content version. encoded_body Encode content body using numeric entities. AUTHOR
Marcus Ramberg <mramberg@cpan.org> LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself. perl v5.14.2 2010-05-23 MojoMojo::Schema::Result::Content(3pm)
All times are GMT -4. The time now is 12:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy