10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
my testfile is
aspsun1:usasp000$cat testfile
open connection
put $TMPDIR/SUNIA.PJ080202.ENGRPTBZ.<OPERATOR>.133 <FILENAME>
quit
my problem statement is to replace the line with put command with 2 different lines a cd command and then put line.
from
put... (2 Replies)
Discussion started by: gotamp
2 Replies
2. Shell Programming and Scripting
Hello experts.
I haven't been able to find a solution for this using the sed command.
I only want to replace the forward slash with string "FW_SLASH" only if there's a number right after the slash while preserving the original number.
I have a file containing 2 entries:
Original File:... (5 Replies)
Discussion started by: pchang
5 Replies
3. Shell Programming and Scripting
Hi,
I have a text file with the normal text like:
rfio://castor/cern.ch/user/p/pooja/WorkArea/Fall11/QCD/QCD800To1000/bkg_40_2_yOo.root
I want to make shell script which ask for the word to replace where it sud take "'/" variable as well. And change it to the pattern I need.
Here in the... (3 Replies)
Discussion started by: nrjrasaxena
3 Replies
4. Shell Programming and Scripting
hi
hope somebody can help, there seems to be bit on the net about this, but still cant make it work the way i need.
i have a file live this
mm dd ff /dev/name1
mm dd ff /dev/name2
mm dd ff /dev/name3
mm dd ff /dev/name4
i need to update /dev/name1 etc to /newdev/new/name1 etc
so... (5 Replies)
Discussion started by: dshakey
5 Replies
5. UNIX for Dummies Questions & Answers
i need to replace '/' forward slash with \/(backward slash follwed by a forward slash) using sed command when the forward slash occurs as a first character in a file..
Tried something like this but doesn't seem to work.
find $1 -print0 | xargs -0 sed -i -e 's/^\//\\\//g'
Can someone... (19 Replies)
Discussion started by: depakjan
19 Replies
6. Shell Programming and Scripting
I have:
/path/to/my/fixdir/MD1234567.tar
I want to have:
/path/to/my/fixdir/MD/1234567.tar
fixdir never changes but MD does and how many numerical digits does. I want something like:
/usr/bin/sed 's/fixdir\/../fixdir\/..\//'
This ends up:
/path/to/my/fixdir/../1234567.tar
But... (3 Replies)
Discussion started by: crowman
3 Replies
7. Shell Programming and Scripting
Hello all,
I'd like to replace "," by "/" in a utf8 file from postion X to Y. Comma "," is also defined as delimiter.
12345678901234567890,123456789012345,12345678901234567890,
aaaa,aaaa,aaaaa ,bbb,bbbb,bbbbb ,cccccc,cc ,
Result should be... (1 Reply)
Discussion started by: fmofmo
1 Replies
8. Shell Programming and Scripting
Hi all,
I need to know way of inserting backward slash before forward slash. My problem is that i need to supply directory path as an argument while invoking cshell script. This argument is further used in script (i.e. sed is used to insert this path in some file). So i need to place \ in front... (2 Replies)
Discussion started by: sarbjit
2 Replies
9. Shell Programming and Scripting
Hi All,
I am trying to replace paths with \ (as in NT) with / (as in Unix) in a script using sed. Following is the command I use:
sed "s/e:\Kenny_test\csv_files/var/opt/ciw/data/outbound/g" EMEA4710.SQL > test
the string to replace is e:\Kenny_test\csv_files
the target string needs to... (3 Replies)
Discussion started by: Abhidey
3 Replies
10. Shell Programming and Scripting
Using the script: (Called replaceit)
#!/bin/ksh
String=$1
Replace=$2
sed -e "s/${orig}/${new}/g" oldfile.txt > newfile.txt
In oldfile.txt, I'm looking for: getenv("Work")
And change it To: /u/web
I execute the script:
replaceit "getenv(\""Work\"")" /u/web
I'm getting sed... (3 Replies)
Discussion started by: gseyforth
3 Replies