10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
input.txt
I want to make 3 seprate ouputs such that
toast1.txt
ICH.txt
ICH_SV.txt
I have tried "echo" and "sed 's/k/toast1/g' to replace k, but its not quite working. Please help me out :)
Thanks! (4 Replies)
Discussion started by: johnkim0806
4 Replies
2. Shell Programming and Scripting
Hello all,
This is my first post and I hope you can help me out.
I searched for quite some hours now and haven't found a simple solution to my problem.
It is as following:
I got this file:
dl.dropbox.com/u/14586156/stuff/Bookmarks.plist
and want to replace the Text between... (9 Replies)
Discussion started by: pasc
9 Replies
3. Shell Programming and Scripting
Hi guys
In my shell script I have a variable that contains a string that contains the current time.
I want to replace the spaces and colons in the value with underscores.
TIME=`date`
echo $TIME
gives me: Thu Sep 24 16:40:53 BST 2009
I want it to show:... (4 Replies)
Discussion started by: alinaqvi90
4 Replies
4. Shell Programming and Scripting
All I want to do is replace the 2nd line in a file with a variable, eg,
var=xxx
the file 'test' containing:
aaa
bbb
ccc
replace bbb with xxx
aaa
xxx
ccc
I had it working with sed on a redhat machine, but it doesn't work on a mac machine. (4 Replies)
Discussion started by: sideways
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
If I have a variable
var1 ='TH 12/1234'
How can I set this too in a script
var1 ='TH 12~1234'
Bearing in mind "/" might be in a difference place each time and that the "/" might not even exist each time
the variable is set.
Thanks (3 Replies)
Discussion started by: belfastbelle
3 Replies
6. Shell Programming and Scripting
ip1="xxx"
ip2="bbb"
sed 's/$ip1/$ip2/g' (3 Replies)
Discussion started by: shivarajM
3 Replies
7. Shell Programming and Scripting
Hi Guys,
I am needing some help writing a shell script to replace the following in a text file
/opt/was/apps/was61
with some other path eg
/usr/blan/blah/blah.
I know that i can do it using sed or perl but just having difficulty writing the escape characters for it
All Help... (3 Replies)
Discussion started by: cgilchrist
3 Replies
8. UNIX for Dummies Questions & Answers
hi
I have a variable like
k=$DESTDIR/$PKG/$VERSION
I want to replace each $ in string k with say "XXX".
so that k becomes like this "XXXDESTDIR/XXXPKG/XXXVERSION"
when I use echo $k | sed -e "s/\$/XXX" it actually passes expanded of variables $DESTDIR, $PKG and $VERSION to sed.
... (10 Replies)
Discussion started by: ashish_uiit
10 Replies
9. Shell Programming and Scripting
hey
how can i change part of a file
i hve to do in a masses so mv or cp is not practical.
I have to change xxx_rrr to xxx_yyy
pls help
thank (2 Replies)
Discussion started by: ajaya
2 Replies
10. Shell Programming and Scripting
My String variable is holding value as - abc"def
I want to replce " with \"
I tried with awk :
echo $var | awk '{gsub(/"/,"\"");print}'
and I am getting an error, `)' is not expected. (1 Reply)
Discussion started by: videsh77
1 Replies