10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello Team,
I am looking for help to read contains from { } and replace the word.
basically, I need to use this for nagios configuration file where each host/service define within {}.
I want script or syntax to which read first word/line from {} and replace the desire word within that {}.
... (5 Replies)
Discussion started by: ghpradeep
5 Replies
2. Shell Programming and Scripting
Hi Guys,
I am having below content in a file which is tab dimited
file.txt
AUS AUS_UP
NZ NZ_UP
ENG ENG_AP
I need to read the file content and replace it with below output format one to one replace
try("AUS ").ss("AUS_UP")
try("NZ ").ss("NZ_UP")
try("ENG ").ss("ENG_AP") (3 Replies)
Discussion started by: rohit_shinez
3 Replies
3. Shell Programming and Scripting
Hi ,
I have a property file placed in folder /usr/opt/temp/aorc.prop which has values given below . I need to read this file content and replace the node with actual values in a shell script . Each time the script shall replace the node value from the poperty file and execute a cfsend command and... (10 Replies)
Discussion started by: samrat dutta
10 Replies
4. Shell Programming and Scripting
Hi All
There is another challenge which stand in front of me. And want all to have the experience with that
I have a file in Unix say a.txt. What I was trying is to read the file line by line and matching the line to particular pattern, and if that pattern found I want to replace that line... (5 Replies)
Discussion started by: adisky123
5 Replies
5. Shell Programming and Scripting
Hi Friends,
I have a text file like this
cat main.txt
I like this website
cat website > new_website
grep website > hello_website
cat replace.txt
hello
unix
apple
Now, for each line read in 2.txt, I want the pattern "website" in 1.txt to be replaced with it. Basically, I... (9 Replies)
Discussion started by: jacobs.smith
9 Replies
6. Shell Programming and Scripting
Dear all,
I have a number of files and each file has two sections separated by a blank line. At the top section, I have lines which describes the values of the alphabetical characters,
# s #; 0.123
# p #; 12.3
# d #; -2.33
# f #; 5.68
<blank line>
sssssss
spfdffff
sdfffffff
Now I... (4 Replies)
Discussion started by: sasharma
4 Replies
7. Shell Programming and Scripting
Hi All,
I have file1 line below:
$myName$|xxx
Now I need to read the file1 and find for $myName$ in file2 and replace with xxx
file1:
$myName$|xxx
file2:
My name is $myName$
expected output in file2 after executing the script is below:
my name is xxx
Thanks, (8 Replies)
Discussion started by: gdevadas
8 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I'm newbie in UNIX. I would like to ask how to read a file which in Microsoft word format? Inside the doc file is just a few sentences . "It is a text. Help me with it". and I would like to replace the the word of text to message.
I was trying with this
for i in `find . -type f -name... (8 Replies)
Discussion started by: tee
8 Replies
9. Shell Programming and Scripting
Hi All
At the moment the following code works but ideally i do not want to have to change the original $1
tr "\r" "\n" < "$1" > "$1.fix"
printf "\n" >> "$1.fix"
mv "$1.fix" "$1"
FILE=$1
coffee_out="splitmovie"
coffee_fill="-splitAt"
coffee_end="-self-contained -o output.mov $2"... (1 Reply)
Discussion started by: babajuma
1 Replies
10. UNIX for Dummies Questions & Answers
hello.
I'm somewhat a novice here so please be patient. My stumbling block when loading csvs into ORACLE tables is this:
I need to read a csv datafile, check several fields in each line, and if any of stated fields contain A ZERO only then replace it with a null/blank character.
I had a... (9 Replies)
Discussion started by: MrCarter
9 Replies