08-27-2010
It is because sed does not support the: "-i" option. Try the second option.
Also, in what platform are you executing it?
Regards.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Here's what I have...
$ vi foo1
- open foo1 and work around for a while. I yank a few lines into a buffer and then :w to save.
Next I :e foo2 to open foo2 and paste my buffer. I :w to save, but I would like to then be able to go directly back into foo1 where I was before I opened foo2. ... (4 Replies)
Discussion started by: djschmitt
4 Replies
2. Shell Programming and Scripting
Hi,
I am new to scripting, so any help on this would be much appreciated.
I am trying to rename a bunch of files, taking the names sequentially from a list read in another file...
# ls oldnames
file_1
file_2
file_3
# cat names
red
yellow
green
I want the files to take on the... (6 Replies)
Discussion started by: starsky
6 Replies
3. Shell Programming and Scripting
Hi, Guys
I am new to shell programming and just get stuck with one simple question. please kindly help.
According to the tutorial here, we can do something like
for NODE in "ABC 10" "EFG 20"
do
set -- $NODE
echo "letter is $1, number is $2"
done
And the result will... (3 Replies)
Discussion started by: yuanli
3 Replies
4. Shell Programming and Scripting
I have a text file which contains lines in this format - it contains 105 lines in total, but I'm just putting 4 here to keep it short:
58571,east_ppl_ppla_por
58788,east_pcy_hd_por
58704,east_pcy_ga_por
58697,east_pcy_pcybs_por
It's called id_key.txt
I have a sample folder called... (9 Replies)
Discussion started by: biscuitcreek
9 Replies
5. Shell Programming and Scripting
Hello all, I am i am trying to read username password. Bassicaly, i have file called sidlist and it has my database name, username and password....
looks something like this....
db1, user1, pass1
db2, user2, pass2
db3, user3, pass4
but i dont know how to make it work, until i get... (4 Replies)
Discussion started by: abdul.irfan2
4 Replies
6. Shell Programming and Scripting
Hi,
I have a variable which stores file names as a result of find command. I need to delete all these files one by one, i.e. by a loop. Can anyone tell me how can it be done?
The variable f2d has the file names like these
abc.txt
bcd.txt
fff.txt
gef.txt
Now I have used a loop as... (12 Replies)
Discussion started by: jhilmil
12 Replies
7. Shell Programming and Scripting
What I would like to do is read each line in the atdinfile:
A sample atdinfile would look like this:
651
652
653
654
655
656
657
658
659
660
661
664
665
666
667
668 (5 Replies)
Discussion started by: woodson2
5 Replies
8. Shell Programming and Scripting
I have 6 different pipe delimiter files. My loads failing due to missing company code.
File1: 31 st field is company code.
402660076310|2014-12-10 17:22:39|2280361|MRYKI|1||CA|92507|US||1|1|0|0|0||N|A1|ONT|1001891771660009250700402660076310|WM|0201|RALA |2014-12-12|5|2014-12-12|5||FRI - 12... (4 Replies)
Discussion started by: srikanth38
4 Replies
9. Programming
I have a list of .xlsx files (names 1.xlsx, 2.xlsx etc) in a directory, on which I need to insert data from its corresponding text file (named 1.txt, 2.txt etc) on the second worksheet named 'Filtered' and save it. The code I am trying is
#!/usr/bin/python
import os
from... (8 Replies)
Discussion started by: nans
8 Replies
10. Shell Programming and Scripting
Created a shell script to invoke sed to edit multiple files, but am missing something.
Here's the shell script:
oracle:$ cat edit_scripts.sh
#!/bin/sh
#------------------------------------------------------------------------------
# edit_scripts.sh
#
# This script executes sed to make global... (4 Replies)
Discussion started by: edstevens
4 Replies
LEARN ABOUT HPUX
rc.config
rc.config(4) Kernel Interfaces Manual rc.config(4)
NAME
rc.config, rc.config.d - files containing system configuration information
SYNOPSIS
DESCRIPTION
The system configuration used at startup is contained in files within the directory The file sources all of the files within and and
exports their contents to the environment.
/etc/rc.config
The file is a script that sources all of the scripts, and also sources To read the configuration definitions, only this file need be
sourced. This file is sourced by whenever it is run, such as when the command is run to transition between run states. Each file that
exists in is sourced, without regard to which startup scripts are to be executed.
/etc/rc.config.d
The configuration information is structured as a directory of files, rather than as a single file containing the same information. This
allows developers to create and manage their own configuration files here, without the complications of shared ownership and access of a
common file.
/etc/rc.config.d/* Files
This is where files containing configuration variable assignments are located.
Configuration scripts must be written to be read by the POSIX shell, and not the Bourne shell, or In some cases, these files must also be
read and possibly modified by control scripts or the sam program. See sd(4) and sam(1M). For this reason, each variable definition must
appear on a separate line, with the syntax:
No trailing comments may appear on a variable definition line. Comment statements must be on separate lines, with the comment character in
column one. This example shows the required syntax for configuration files:
Configuration variables may be declared as array parameters when describing multiple instances of the variable configuration. For example,
a system may contain two network interfaces, each having a unique IP address and subnet mask (see ifconfig(1M)). An example of such a dec-
laration is as follows:
Note that there must be no requirements on the order of the files sourced. This means configuration files must not refer to variables
defined in other configuration files, since there is no guarantee that the variable being referenced is currently defined. There is no
protection against environment variable namespace collision in these configuration files. Programmers must take care to avoid such prob-
lems.
/etc/TIMEZONE
The file contains the definition of the environment variable. This file is required by POSIX. It is sourced by at the same time the files
are sourced.
SEE ALSO
rc(1M).
rc.config(4)