10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Just surfed on the web for probable answers but could not get them working.
I wish to replace the string containing spaces by another phrase but below answers did not work.
My string is:
PAIN & GAIN
I wish to convert it to:
P&G
I just need it working with sed with function -i
... (6 Replies)
Discussion started by: baris35
6 Replies
2. UNIX for Dummies Questions & Answers
I need to make permanent changes in the file after find and replace using sed.
for this i am using sed -i
However this is not working. says
sed: illegal option -- i
I am working on Sun Solaris uname -a
SunOS aspsun14 5.10 Generic_150400-13 sun4u sparc SUNW,SPARC-Enterprise
any other work... (3 Replies)
Discussion started by: gotamp
3 Replies
3. Shell Programming and Scripting
Hi Experts,
I am new to shell scripting. Need some help in doing one task given by the customer.
The sample record in a file is as follows:
3538,,,,,,ID,ID1,,,,,,,,,,,
It needs to be the following:
3538,,353800,353800,,,ID,ID1,,,,,COLX,,,,,COLY,
And i want to modify this record in... (3 Replies)
Discussion started by: sugarcane
3 Replies
4. Shell Programming and Scripting
Hi,
I have file with all the lines as following format
<namebindings:StringNameSpaceBinding xmi:id="StringNameSpaceBinding" name="ENV_CONFIG_PATH" nameInNameSpace="COMP/HOD/MYSTR/BACKOFFICE/ENV_CONFIG_PATH" stringToBind="test"/>
I want to replace (all the lines) value of... (8 Replies)
Discussion started by: shuklaa02
8 Replies
5. Shell Programming and Scripting
please help me to edit the second field using awk or sed
i have input file below
aa1001 000001
bb1002 000002
cc1003 000003
so i want the output file like below
aa1001 01
bb1002 02
cc1003 03 (38 Replies)
Discussion started by: zulabc
38 Replies
6. Shell Programming and Scripting
FILE A:
9780743551526,(Abridged)
9780743551779,(Unabridged)
9780743582469,(Abridged)
9780743582483,(Unabridged)
9780743563468,(Abridged)
9780743563475,(Unabridged)
FILE B:
c3saCandyland 9780743518321 "CANDYLAND" "MCBAIN, ED" 2001
c3sbCandyland 9780743518321 ... (7 Replies)
Discussion started by: glev2005
7 Replies
7. UNIX for Advanced & Expert Users
I'm having a couple of issues. I'm trying to edit a nagios config and remove a host definition if a certain "host_name" is found. My thought is I would find host definition block containing the host_name I'm looking for and output the line numbers for the first and last lines. Using set, I will... (9 Replies)
Discussion started by: mglenney
9 Replies
8. Shell Programming and Scripting
What is an efficient way to remove all lines from the input file which contain a file name?
inputfile:
=======================
# comment
# comment
# comment
5 8 10 /tmp
5 8 10 /var/run
5 8 10 /etc/vfstab
5 8 9 /var/tmp
5 8 10 /var/adm/messages... (7 Replies)
Discussion started by: Arsenalman
7 Replies
9. Shell Programming and Scripting
I have the follwoing file:
This looks to be : seperated.
For the first field i want only the file name without ".txt" and also i want to remove "+" sign if the second field starts with "+" sign.
Input file:
Output file:
Appreciate your help (9 Replies)
Discussion started by: pinnacle
9 Replies
10. Shell Programming and Scripting
Col1 Col2 Col3 Col4
12 Completed 08 0830
12 In Progress 09 0829
11 For F U 07 0828
Considering the file above, how could i replace the third column the most efficient way? The actual file size is almost 1G. I am... (10 Replies)
Discussion started by: tamahomekarasu
10 Replies