10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore.
Here is what 's happening:
* I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies
2. Shell Programming and Scripting
Hi All,
i'm writing a script where i have to grep for a pattern and the 3 lines after the pattern and comment them out.
Note that i have to do this for multiple files, i am able to grep the pattern and the next 3 lines but since solaris does not recognize the -i option, i was wondering if... (11 Replies)
Discussion started by: Irishboy24
11 Replies
3. Shell Programming and Scripting
Hi Experts,
I am using this command to edit the file contents and also add the header to the existing file.
I prepared this command on my VM (Linux) and it worked as I wanted it to work. But on solaris its not working :(. Please help as it is quite urgent.
sample File:
a
b
Output... (5 Replies)
Discussion started by: sugarcane
5 Replies
4. Shell Programming and Scripting
I am trying to use sed to make some changes to some HTML-like code. The code looks like this:
<aaa bbb="xxxx" params="@abc@ @defghi@ @j@"></aaa>
<aaa params="@abc@ @defghi@">value</aaa><aaa params="@klm@ @nopq@ @rstu@"></aaa>
<aaa params="@v@ @wxy@ @z@"></aaa>There is an aaa tag which can... (4 Replies)
Discussion started by: RickS
4 Replies
5. Shell Programming and Scripting
Hi all,
I want to replace the first two occurances of "Gautam" with "Gomzy" using the sed command. if i do this:
sed 's/gautam/gomzy/g' <filename>
Then it replaces all the occurances of gautam with gomzy. But i only want to replace the first two occurances. i tried out with this:
sed... (2 Replies)
Discussion started by: gautamshaw
2 Replies
6. Shell Programming and Scripting
Hi again!
Sed is very difficult to understand for me... :(
I have a file like this
And I'm looking for this result
I found sed '$!N;s/\n/ /' => Put Line1 and Line2 together, Line3 and Line4...
I tried |sed '$!N;s/\n*\n/ /' but it didn't work...
Thanks for your help
PS:And... (6 Replies)
Discussion started by: Castelior
6 Replies
7. Shell Programming and Scripting
I am trying to execute a script with sed that works well in ksh(Linux) however in bash(solaris 8) though it does not give any errors the output file becomes 0 byte.
header of the script:
ksh:2$ head news.ksh
#!/bin/ksh... (2 Replies)
Discussion started by: acharania2011
2 Replies
8. Shell Programming and Scripting
HI,
I have a file test which content are as
APP_NAME="%APPNAME%"
Now, i m using sed command to replace the %APPNAME% with variable APPNAME.
Here variable value is as
export APPNAME="AB"
sed -i "" -e "s:%APPNAME%:$APPNAME:" ./test
test file become as
APP_NAME="AB"
Which is... (4 Replies)
Discussion started by: Saurabh78
4 Replies
9. UNIX for Advanced & Expert Users
Hi,
I tried the following
sed -n '/one/p' file1
I need to understand, is it possible to search pattern irrespective of case.
Thanks,
Shahnaz. (4 Replies)
Discussion started by: shahnazurs
4 Replies
10. Solaris
Hi,
The config file:
# Port(s) for accepting client connections
RTSPPort=554
bash-3.00# awk -F"=" -v gr="888" '/RTSPPort/{$2=gr;}1' OFS="=" server.ini
awk: syntax error near line 1
awk: bailing out near line 1
Can you help me on why this doesn't work.
The next one neighter. Dosn't... (0 Replies)
Discussion started by: potro
0 Replies