Hi i have a control file which i need to read. It is ',' separated. the 3rd parameter will be ';' separated.
I have 2 files:
/home/orig.txt
/home/join.txt
I need a O/P file name based on firstparameter_1.txt and it should have the content of /home/orig.txt
and appended content from /home/join.txt where it finds keywords from last parameter.
While copying all the content from orig to O/P fiel it should check for any entries of keywords from last parameter and delete whole line if there is an entry
Lines should be appeneded immediately after it finds 'record' key word.
__________________________________________________________________
The last parameter frm the control file can vary from 1 to n and it will be ; separated if it has greater than 2 entries.
Hi,
I have encountered a problem that I am unable to find a workaround for. I have 52 numbers and I need to submit an individual job for each pair combination, so too many to do by hand.
I have created a submission file (submission_code.sh) which contains the following code:
gcta64... (2 Replies)
Say i have:
g_gateway domain="abc.com" to="123.123.123.123" relay="false"
how do i use awk or sed or any method to get the result below:
abc.com 123.123.123.123 (3 Replies)
Hello All,
I hope someone could help me with this.
I'm creating a shell script to run a process. The trouble is, part of the process has to be ran as a different user. I can 'su' to the user ok, but I'm having trouble passing a 'cd' command as well as some variables I set earlier in the... (1 Reply)
Hi,
i am writing a bash file and need to list the command name and user for the busiest process ie the one using the greatest percentage of CPU time)
im kind of stuck. i know you should get the highest CPU , sort column 3 then take off the head but i'm un sure how would i do that?
echo... (2 Replies)
I am trying to execute a piped combination of shell commands inside a perl program.
However, it is not working as desired.
This is my program, i am trying to print only filenames from the output of ls -l
$ cat list_test
#!/usr/bin/perl -w
use strict;
my $count=0;
my @list=`ls -l|awk... (4 Replies)
Hello I am hoping you may help.
I am not sure how to go about this exactly, I know the tools but not sure how to make them work together.
I have two SED commands that I would like to run in a shell script. I would like to take
the manual input of a user (types in when prompted) to be used... (4 Replies)
Hi,
I am trying to print a specific line in a file through sed or awk. The line number will be passed as a parameter from the previous step. My code looks as below.
TEMP3=`sed -n '$TEMP2p' $FILEPATH/Log.txt`
$TEMP2, I am getting from the previous step which is a numerical value(eg:3).
... (2 Replies)
Hello,
I am a newbie to linux and struggling to find a better way to append a column in a text file.
Here is the file i want to modify: It has 8 columns (and thousands of rows). I want to append the first column by adding "chr" infront of the numbers. Some rows have a string in the first... (4 Replies)
Can I use my own variables within awk and sed for example:
I've written a while loop with a counter $i and I want to use the value of $i within sed and awk to edit certain lines of text within a data file.
I want to use :
sed '1s/$/texthere/g' data.csv
Like this:
sed '$is/$/$age/g' data.csv... (5 Replies)