Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: tuathan
22,355
Posted By tuathan
thanks! this works well but is there a way to...
thanks! this works well but is there a way to just replace NOVEMBER in file1.txt rather than just output to terminal??
22,355
Posted By tuathan
replace (sed?) a single line/string in file with multiple lines (string) from another file??
Can someone tell me how I can do this?

e.g:

Say file1.txt contains:

today is monday
the 22 of
NOVEMBER
2010

and file2.txt contains:

the
11th
month
of

How do i replace the...
20,452
Posted By tuathan
#!/bin/sh -f # testing real number operations:...
#!/bin/sh -f
# testing real number operations: division
#
echo "Input REAL 1:"
read RL1
echo ""
echo "Input REAL 2:"
read RL2
echo ""
RL3=$(echo "scale=2; $RL1 / $RL2" | bc)
echo $RL3
exit
9,622
Posted By tuathan
i got this to work: #!/bin/sh -f rm -f...
i got this to work:

#!/bin/sh -f
rm -f sedtest.out
touch sedtest.out
sed -e s/s/S/ \
-e s/e/E/ \
-e s/d/D/ \
-e s/t/T/ \
-e s/e/E/ \
-e s/s/S/ \
-e s/t/T/ <sedtest.inp > sedtest.out...
9,622
Posted By tuathan
Sed command over multiple lines in csh??
hi i have a long sed command in a csh script that won't fit on 1 line.
how do i break it up correctly over multiple lines?

this doesn't seem to work in csh:

sed -e s/template/$IP.$NN/ \
-e...
2,452
Posted By tuathan
Is it possible to replace more the 1 string with one SED?
i want to replace two phrases in text file

originalstringA.1.
blah blah....
originalstringB.1.

got this code so far:

#variables
IP=$1
NO=$2
FS=$3
IS=$4
NN=1
#echo variables...
10,373
Posted By tuathan
touch tempscript TMPST=tempscript echo...
touch tempscript
TMPST=tempscript
echo "/well2xmgr4.exe <<+" >> $TMPST
echo $IP >> $TMPST
echo + >> $TMPST
echo exit >> $TMPST

this worked for what i want to do.
Forum: Open Source 11-19-2008
263,746
Posted By tuathan
vi over ssh gedit locally
vi over ssh

gedit locally
10,373
Posted By tuathan
Script to open program and send/execute command in program
Hi,

i want to write a script that executes a program (exec?) .
this program then requires a filename as input.
how do i give it this input in the script so the program will be complete run and...
7,535
Posted By tuathan
thanks this is very useful for what i want to do...
thanks this is very useful for what i want to do :)
7,535
Posted By tuathan
Help with Script: If diff between files is nothing then set a variable
how about a script that compares 2 files using diff (or similar) and if they are then same then set a variable, v1=int else v1=0.

thanks
40,099
Posted By tuathan
How to search (grep?) filename for a string and if it contains this then...
Hi i want to write a script that will search a filename e.g. test06abc.txt for a string and if it contains this string then set a variable equal to something:

something like:

var1=0

search...
Showing results 1 to 12 of 12

 

Featured Tech Videos

All times are GMT -4. The time now is 05:41 AM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy