10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file: file.txt, which contains the following data in it.
This is a file, my name is Karl, what is this process, karl is karl junior, file is a test file, file's name is file.txt
My name is not Karl, my name is Karl Joey
What is your name?
Do you know your name and... (3 Replies)
Discussion started by: anuragpgtgerman
3 Replies
2. Shell Programming and Scripting
Hi All,
Hope you guys had a wonderful weekend
I have a scenario where in which I have to read a file line by line
and check for few words before redirecting to a file
I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
Discussion started by: Kingcobra
6 Replies
3. UNIX for Dummies Questions & Answers
I have a file from which I am trying to delete a particular word on a particular line.
NEW
NEW
/v/engine
NEW
/ifs/list
NEW
/ifs/vdrome
NEW
I am trying to delete the first line only if it contains the word NEW. I am also trying to delete the last line only if it contains the word NEW. I... (11 Replies)
Discussion started by: newbie2010
11 Replies
4. UNIX for Dummies Questions & Answers
I want to delete the last word of each line in all the files in one directory but dont know what I am doing wrong
FILES="data/*"
for X in $FILES
do
name=$(basename $X)
sed s/'\w*$'// $X > no-last/${name}
done
Can you please help me :wall: (8 Replies)
Discussion started by: A-V
8 Replies
5. Shell Programming and Scripting
Hi,
I have to search a word in a text file and then I have to delete lines above from the word searched . For eg suppose the file is like this:
Records
P1
10,23423432
,77:1
,234:2
P2
10,9089004
,77:1
,234:2
,87:123
,9898:2
P3
456456
P1
:123,456456546
P2
abc:324234 (2 Replies)
Discussion started by: vsachan
2 Replies
6. Shell Programming and Scripting
I have a line that gets pulled from a database that has a variable number of fields, fields can also be of a variable size. Each field has a variable number of spaces between them so there is no 'defined' delimiter. The LastData block is always a single word.
What I want to do is delete the... (2 Replies)
Discussion started by: Bashingaway
2 Replies
7. Shell Programming and Scripting
i have a file in this pattern
MATCH1 word1 IMAGE word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1 word2 word3 word4
MATCH1 word1 IMAGE word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1 word2 word3 word4
MATCH2 word1... (7 Replies)
Discussion started by: bangaram
7 Replies
8. Shell Programming and Scripting
Hi All
Can u help me..
My problem is delete word per line
sample:
cat /tmp/file.txt
monitor 192.168.1.11 Copying files in current directory 1
monitor 192.168.1.1 Copying files in current directory 2
monitor 192.168.1.12 Copying files in current directory 3
monitor 192.168.1.14... (1 Reply)
Discussion started by: carnegiex
1 Replies
9. UNIX for Advanced & Expert Users
Hi Canone please provide me solution how can achieve the result below:
File1.txt
$
sweet appleŁ1
scotish
green
$
This is a test1
$
sweet mangoŁ2
asia
yellow
$
This is a test 2
$
sweet apple red (there is no pound symbol here)
germany
green (1 Reply)
Discussion started by: Aejaz
1 Replies
10. UNIX for Dummies Questions & Answers
Hi I have a text file like this name today.txt
the request has been accepted
the scan is successful at following time
there are no invalid packages
5169378 : map : Permission Denied
the request has been accepted
Now what i want do is
I want to search the today.txt file and
if i... (1 Reply)
Discussion started by: gsusarla
1 Replies