10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have the following code:
#!/bin/csh
clear
set cloud_file="/home/labs/koren/davidsr/general_scripts/MFP_10_PP_Parmas.txt" # to fill
set mie_tables_dir='/home/labs/koren/davidsr/SHDOM_MAIN/MIE_TABLES/non_polo_wave_0.7_water_50R_s0.5_e25_max_70.mie' # to fill
set prp_dir='${pp_dir}/pp_prp/'... (2 Replies)
Discussion started by: student_wiz
2 Replies
2. Shell Programming and Scripting
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies
3. Shell Programming and Scripting
Hi, I have a question.
I define a function using sed command:
replace()
{
searchterm=$1
replaceterm=$2
sed -e "s/$searchterm/$replaceterm/ig" $3 > $WORK'tempfile.tmp'
mv $WORK'tempfile.tmp' $3
}
Then I call
replace 'test = 0' 'test = 1' $myfile
This code... (1 Reply)
Discussion started by: Dark2Bright
1 Replies
4. Shell Programming and Scripting
Hi, I have a question.
I define a function using sed command:
replace()
{
searchterm=$1
replaceterm=$2
sed -e "s/$searchterm/$replaceterm/ig" $3 > $WORK'tempfile.tmp'
mv $WORK'tempfile.tmp' $3
}
Then I call
replace 'test = 0' 'test = 1' $myfileThis code works well in... (1 Reply)
Discussion started by: Dark2Bright
1 Replies
5. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies
6. Shell Programming and Scripting
sed replace not work Pls. help me
I used sed command in my file
66875964560@1982589 90825890001@90825890001@3@15/12/2007 14:25:14@22/03/2010 6:06:13@20/01/2010 3:28:39
66873064490@1925912 90259120001@90259120001@5@02/04/2009 1:51:31@30/10/2009 3:08:34@13/09/2009 8:24:33... (3 Replies)
Discussion started by: ooilinlove
3 Replies
7. Shell Programming and Scripting
Hello,
I would like to delete all the footnotes in all my htm files. Hence, I have to delete the whole font tag pairs, i.e. deleting everything between the begin/end font tags.
I create a testfile, of which data parts of all four lines are the same except for the number of font tag pairs,... (3 Replies)
Discussion started by: cibalo
3 Replies
8. Shell Programming and Scripting
Hi
This is what I was trying to do, comment one line and add something different in a new line right next.
This is the command I want to do
more .profile | sed 's,STRING1, #STRING1 NEWLINE STRING2,'
(I´m using ',' because my string is something like this
exec... (3 Replies)
Discussion started by: alcalina
3 Replies
9. UNIX for Dummies Questions & Answers
Howdie everyone...
I have a shell script RemoveFiles.sh
Inside this file, it only has two commands as below:
rm -f ../../reportToday/temp/*
rm -f ../../report/*
My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies
10. Shell Programming and Scripting
Hello
I' m confused a bit.
I want to replace string "&" with "&" using this command.
sed 's/&/&/g'
and it doesn't work. Nothing happens.
On the other side this works:
sed 's/&/@/g'
or sed 's/&/^/g' !!!
Can somebody help please?
Thanks (3 Replies)
Discussion started by: billy5
3 Replies