03-15-2006
Changing Pattern in a file
I have a config file with the pattern given below.
/usr/games cocoa fudge # export to only these machines
/usr -access=clients # export to my clients
/usr/local # export to the world
/usr2 -access=bison:deer
up # export to only these machines
....
I need to join any line in this file with the pattern as
/usr/games cocoa fudge ==> /usr/games:cocoa:fudge and o/p it to any file.
I was using SED as an option but till was unable to get in the required format.
Any help for this will be highly appreciated.
Thanks in Advance.
Phani
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file with contents in this format....
... (3 Replies)
Discussion started by: kripssmart
3 Replies
2. Shell Programming and Scripting
Hi All,
Please can someone assist in the script I have made that searches a pattern in a file and delete the whole line containing the pattern.
#!bin/sh
# The pattern that user want to add to the files
echo "Enter the pattern of the redirect"
read value
# check if the user has... (1 Reply)
Discussion started by: Shazin
1 Replies
3. Shell Programming and Scripting
Hi, I have 2 files that I have modified to basically match each other, however I want to determine what (if any) line in file 1 does not exist in file 2. I need to match column $1 and $2 as a single string in file1 to $1 and $2 in file2 as these two columns create a match.
I'm stuck in an AWK... (9 Replies)
Discussion started by: right_coaster
9 Replies
4. Shell Programming and Scripting
Hi,
I got a file which looks like this:
Value A
Status: -
Other: -
Value B
Status: -
Other: -
Value C
Status: -
Other: -
I would like to change only the first line which includes the "Status:" string after matching the line containing "Value B", so the output file should look... (5 Replies)
Discussion started by: wenclu
5 Replies
5. Shell Programming and Scripting
Hello All,
I have a file say
cat test.txt
sathya sxk opt
Sandy sxr omg
Ram rxm opt
Now I would like to change opt to omr only for the line in my file
sathya sxk opt
How can i do it.
I know we can do it with sed -i option, but its not present in my system, please help me some... (13 Replies)
Discussion started by: sathyaonnuix
13 Replies
6. Shell Programming and Scripting
I am trying to search a file for a patterns ERR- in a file and return a count for each of the error reported
Input file is a free flowing file without any format
example of output
ERR-00001=5
....
ERR-01010=10
.....
ERR-99999=10 (4 Replies)
Discussion started by: swayam123
4 Replies
7. Shell Programming and Scripting
Hi,
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
9 Replies
8. Shell Programming and Scripting
i have little challenge, help me out.i have a file where i have a value declared and and i have to replace the value when called. for example i have the value for abc and ccc. now i have to substitute the value of
value abc and ccc in the place of them.
Input File:
go to &abc=ddd;
if... (16 Replies)
Discussion started by: saaisiva
16 Replies
9. Shell Programming and Scripting
HI,
I have File1 which contains :-
admins = anand,satheesha,user1,user2,user3,user4,user5,user10,vishal
nonadmins = read-only
@admins = rw
@nonadmins = r
One shell script, using that I want to change the File1 as per user input (let's say $1) which have value as 'John', so now I want to... (6 Replies)
Discussion started by: Vishal Mishra
6 Replies
10. Shell Programming and Scripting
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
LEARN ABOUT DEBIAN
childsplay
Childsplay(6) Childsplay(6)
NAME
Childsplay - Educational games for young children.
SYNTAX
childsplay [option]
DESCRIPTION
Childsplay is a suite of educational games for young children. It's a plugin system, so childsplay is basically a framework where you put
in as many game modules as you like. Childsplay comes with a few standard games, so check the website (see below) for additional games.
OPTIONS
--fullscreen
Toggle the fullscreen mode. The screen size stays 800x600, so if you have a bigger resolution you have to live with a black border.
This is the default mode.
--window
Toggle windowmanager mode. Display the screen in a window of 800x600.
--help Output help information and exit.
--version
Output version information and exit.
FILES
/usr/local/bin/childsplay
/usr/local/games/childsplay
/usr/local/doc/childsplay
EXAMPLES
To run this program the standard way type:
childsplay
Alternativly you can run it as:
childsplay --window
AUTHORS
Stas Z <stasz@linux.isbeter.nl>
SEE ALSO
http://childsplay.sourceforge.net
Read the docs that came with the tarball.
Stas Z 0.46 11/09/2002 Childsplay(6)