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
Hi friends
I have two files
cat file1
i am the header
a
b
c
d
cat file2
e
f
g
h
I want a script that would give me file2 with the header/first line as if in file1 (3 Replies)
Discussion started by: jacobs.smith
3 Replies
3. Shell Programming and Scripting
Hi,
I have a requirement where i have to read a file line by line and see if the string(fixed postion 10 to 15 in the file) in line 2 is greater than string in line 1.
I have used following code
while read LINE1
do
current_inv_no=$(echo "$LINE1" | cut -c 10-15)
read... (2 Replies)
Discussion started by: chethanbg2010
2 Replies
4. Shell Programming and Scripting
i have applied the following command on a file named unix.txt that contains the string "linux from the text"
grep -n -i -w "linux from the text" unix.txt
and the result is
5:Today's Linux from the text systems are split into various branches, developed over time by AT&T as well as various... (5 Replies)
Discussion started by: arindamlive
5 Replies
5. UNIX for Dummies Questions & Answers
My scenario:
1. textfle
2. every line similar to:
"...____ your sister?is1are0am0Grammar point1_______ the chairs in..."
3. need to extract only the numbers in each line, eg 001 in the case above.
Tried different GREP/Sed combinations but...here I am
An output like that would be... (9 Replies)
Discussion started by: eldeingles
9 Replies
6. Shell Programming and Scripting
Hi experts,Please help me for the below requirement. i have a source file.(lets say contains 50 columns). I am extarcting five columns from the source file by using pattern file. for example input file:--------a,b,c,d,"a,g","v b",s,koutputfile=======a,"a,g","v b",s,kThanks in advance subhendu (2 Replies)
Discussion started by: subhendu81
2 Replies
7. Shell Programming and Scripting
Hi All,
Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern.
#!bin/sh
# The pattern that user want to add to the files
echo "Enter the pattern of the redirect"
read value
# check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies
8. Shell Programming and Scripting
Hi,
I would like to extract a certain portion of sentences from a particular sentence i.e. to extract the last section embrace by
input
output
Please advice.
Cheers (6 Replies)
Discussion started by: dwgi32
6 Replies
9. UNIX for Dummies Questions & Answers
I was proposed with the following problem:
The file 'numbers' contains a list of numbers. Write a command to place the
largest one of those numbers in the file 'largest' (there should be nothing
else in that file). Do not use the 'head' command in your answer.
I think if i used the sort... (1 Reply)
Discussion started by: stava
1 Replies
10. UNIX for Dummies Questions & Answers
I have a datafile contain hundreds of lines:
line1
1
2
line4
==================
line1
4
2
line4
==================
line1
3
1
line4
=================== (3 Replies)
Discussion started by: bobo
3 Replies