10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I'm new to scripting.. facing some problems while inserting content of a file into another file...
I want to insert content of a file (file2) into file1, before first occurrence of "line starts with pattern" in file1
file1
======
working on linux
its unix world
working on... (14 Replies)
Discussion started by: Jagadeesh Kumar
14 Replies
2. Shell Programming and Scripting
if it is finding some data based on pattern 'test' then insert else if has no data based on the pattern 'test' then exit successfully
cat file | grep test > file2 (3 Replies)
Discussion started by: jagu
3 Replies
3. Shell Programming and Scripting
Hello Experts,
I got a requirement i have a input file which am getting from different source,Now i want to add extra 3 columns to this file like BASE,ACTUAL and DATE.
Input File Looks like
QUAL CHGE TYP LAW COM1 COM2
A 1 X SED HO ASE
B 3 Z CDE SE ... (5 Replies)
Discussion started by: ahmed.vaghar
5 Replies
4. Shell Programming and Scripting
Hi all ,
I have a file having 12 columns tab delimited .
I need to read this file and remove the column 3 and column 4 and insert a word in column 3 as "AVIALABLE "
Is there a way to do this . I am trying like below
Thanks
DJ
cat $FILENAME|awk -F"\t" '{ print $1 "\t... (3 Replies)
Discussion started by: Hypesslearner
3 Replies
5. Shell Programming and Scripting
Hi All ,
I have pipe delimiter file with 11 columns . I need to insert 4 empty columns after column 10 . and After 11 column I need to insert a column which is having the same value for all the rows .
My file
1|2|3|4|5|6|7|8|9|10|11
New file
... (11 Replies)
Discussion started by: Hypesslearner
11 Replies
6. Shell Programming and Scripting
Hello,
I have some problem in inserting the space for the pairs of columns.
I have the input file :
I used this code below in replacing it using space in specific column (replace space in each two columns)
sed -e "s/,/ /2" -e "s/,/ /3" inputfile
Output showed :
However, I have many... (3 Replies)
Discussion started by: awil
3 Replies
7. Shell Programming and Scripting
Hi,
I have a tab delimited flat file, for example shown below
Name Desg Loc
a b c
d e fI want to insert an empty column inbetween the column Desc and Loc, the result should be like shown below:
Name LName Desg Loc
a b c
d e ... (6 Replies)
Discussion started by: sampoorna
6 Replies
8. Shell Programming and Scripting
If the string is of the pattern XxxXyzAbc...
The expected out put from sed has to be Xxx Xyz Abc ...
eg: if the string is QcfEfQfs, then the expected output is Qcf Ef Efs.
If i try to substitute the pattern with space then the sed will replace the character or pattern with space,... (1 Reply)
Discussion started by: frozensmilz
1 Replies
9. Shell Programming and Scripting
i am not sure what i should be using but would like a simple command that is able to insert a certain block of text that i define or from another text file into a xml file after a certain match is done
for e.g
insert the text
</servlet-mapping>
<!-- beechac added - for epic post-->... (3 Replies)
Discussion started by: cookie23patel
3 Replies
10. Shell Programming and Scripting
I am trying to do some thing like this ..
In a file , if pattern found insert new pattern at the begining of the line containing the pattern.
example:
in a file I have this.
gtrow0unit1/gctunit_crrownorth_stage5_outnet_feedthru_pin
if i find feedthru_pin want to insert !! at the... (7 Replies)
Discussion started by: pitagi
7 Replies