10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to replace an entire mailx line as follows using sed:
sed -e 's/<line1>/<newline>/g' <filename>
But I am getting comman garbled error since the new line has many special characters. I enclosed allspecial chars in \ but still no use.
Can any one help me?
Please use code... (2 Replies)
Discussion started by: vinodhin4
2 Replies
2. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
3. Shell Programming and Scripting
I'm trying to write a bash script called YN that looks like the following
YN "Specify a question" "doThis" "doThat"
where "doThis" will be executed if the answer is "y", otherwise "doThat".
For example
YN "Do you want to list the file dog?" "ls -al dog" ""
Here's my attempt... (3 Replies)
Discussion started by: LeoKSimon
3 Replies
4. Shell Programming and Scripting
I am using ksh, By doing change in .profile as
set -o vi
my updown and history does not work.
Also I can not edit command line on prompt using vi command.
My TERM is vt100.
What is wrong here ?
Thanks.
:cool: (3 Replies)
Discussion started by: ekb
3 Replies
5. Shell Programming and Scripting
i am using a newprocess, but i forgot the key point
Changed subject. See post below from Neo (2 Replies)
Discussion started by: Maryeveryday
2 Replies
6. Shell Programming and Scripting
I want to replace one line from my configuration file with the new settings.
The file Name: /etc/httpd/conf/httpd.conf
The following line should be replaced with the line mentioned below.
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "\"%h\"... (3 Replies)
Discussion started by: shantanuo
3 Replies
7. Shell Programming and Scripting
Hey guys, I have a file that I've slowly been awking, seding, and greping for data entry. I am down to pull the addresses out to insert them into an excel file. Each address is a few lines, but i want to put a semicolon delimiter in between each address so I can export the text file into excel and... (6 Replies)
Discussion started by: Cocoabean
6 Replies
8. Shell Programming and Scripting
I have a perl function in my script that needs to replace an entire line in a file
sub changestate {
my $base = ();
my @base = ();
open(BASE, $file) || die("Could not open file!");
@base=<BASE>;
close (BASE);
foreach $base(@base)
{
if($base =~... (1 Reply)
Discussion started by: insania
1 Replies
9. Shell Programming and Scripting
I need to determine what processes are running at certain times of the day. I have a script that issues the /usr/ucb/ps aux command and captures it to a file.
I want to see the cpu usage and memory usage.
This command lops off the end of the of the display line so I can't see the entire... (2 Replies)
Discussion started by: MizzGail
2 Replies
10. UNIX for Dummies Questions & Answers
Dear Techs,
In the past on a different box (HP) I use to be able to complete something I was typing by entering a portion of the filename in the pwd and I would hit the Esc key and it would match the rest of the filename. I did this without understanding how it was setup.
Now I am on a new... (1 Reply)
Discussion started by: jxh461
1 Replies