10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have a file with multiple lines, all in the same format. For each line, I need to replace the sequence of digits after the last : with a new value, but keep the single quote at the end of the line.
Example:
Input: ( two lines of file)
Name: 'text1:200/text2:1.2.3.4'
Name2:... (19 Replies)
Discussion started by: Beginner101
19 Replies
2. Shell Programming and Scripting
Not able to paste my content. Please see the attachment :-( (2 Replies)
Discussion started by: vivek d r
2 Replies
3. UNIX for Dummies Questions & Answers
`echo $file | sed 's/ / /g'`
Hey guys I want help in converting the spaces in my file names to '\ ' .
Example:
UK maps --> UK\ maps
Could someone please help me.
I have tried the following sequences already (none of them work):
1)s/ /\ /g
2)s/ /\\ /g
3)s/ /\\\ /g
Can someone... (7 Replies)
Discussion started by: INNSAV1
7 Replies
4. Shell Programming and Scripting
I have a file with multiple lines like this:
<junk><PATTERN><junk><PATTERN><junk>
<junk><PATTERN><junk><PATTERN><junk><PATTERN><junk>
Note that
1. There might be variable number occurrences of PATTERN in a line.
2. <> are just placeholders, they do not form part of the pattern.
I need... (4 Replies)
Discussion started by: flatley
4 Replies
5. Shell Programming and Scripting
Hi ,
My file have data like
4:ALMOST NEVER PR 1925836
5:NEVER PR W DDA 5857610
6:NEVER PR WO DDA 26770205
but i want to replace the spaces before last numric digits out put should be like this
4:ALMOST NEVER PR=1925836
5:NEVER PR W DDA=5857610
6:NEVER PR WO... (7 Replies)
Discussion started by: max_hammer
7 Replies
6. Shell Programming and Scripting
myfile:
AAAaaa
BBBbbb
CCCccc
AAAeee
DDDddd
how to replace the last AAA as EEEEE using sed?
like this:
AAAaaa
BBBbbb
CCCccc
EEEEEeee
DDDddd (14 Replies)
Discussion started by: vistastar
14 Replies
7. Shell Programming and Scripting
Hi,
I have an sqlplus output file using the character ';' as a delimiter and I would like to replace the fields without datas (i.e delimited by ';;') by ';0;'
Example: my sqlplus output:
11;22;33;44;;;77;;
What I would like to have:
11;22;33;44;0;0;77;0;
Thanks in advance for your... (2 Replies)
Discussion started by: popesk
2 Replies
8. Shell Programming and Scripting
hi,
i need to replace a line a file with a new raw device location..
original file..
/opt/sybase/ASE1502/ASE-15_0/bin/dataserver \
-d/data/TST_AKS1/sybdevices/master.dat \
-e/logs/sybase/TST_AKS1/SFO_TST_AKS1.log \
-c/apps/sybase/ASE1502/ASE-15_0/TST_AKS1.cfg \... (2 Replies)
Discussion started by: aksaravanan
2 Replies
9. Shell Programming and Scripting
Hello All,
I have a string "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031", and I just want to extract LLSV1, but I dont get the expected result when using the sed command below.
# echo "CP_STATUS OSSRC_R6_0_Shipment_R1H_CU AOM_901046 R1H_LLSV1_2008031" | awk '{print... (4 Replies)
Discussion started by: racbern
4 Replies
10. Shell Programming and Scripting
I have awhole bunch of files and I want to edit stringA with stringB without changing the filename.
I have tried the following sed commands:
sed "s/stringA/stringB/g" *
This will print the correct results but does not actually save it with the new content of the file. when I do a cat on... (5 Replies)
Discussion started by: jjoves
5 Replies