07-21-2005
a have a file "ren"
a1 s
a2 h
b1 k
b2 j
b3 p
b4 d
c3 m
.......
......
i want to change "a1" to "s","a2" to "h", ..... and so in file "f_name"
a1 6
b1 7
b3 9
b4 0
b2 6
......
......
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I am trying to figure out the syntx to delete multiple lines w/ sed. I know the following syntax will delete lines 1 THROUGH 5 from filex:
sed 1,5d filex
But I wan to delete lines 1 AND 5 (keeping lines 2,3, and 4). Does anyone know how to do this in a single sed statement?
... (2 Replies)
Discussion started by: bookoo
2 Replies
2. UNIX for Dummies Questions & Answers
Good morning,
Novice scripter in Unix here, and I've run into and sed task I can't quite wrap my head around. I'm pulling my hair out fast enough as it is and thought I would go to the knowledge bank.
I have a sorted file that I'm trying to trim down by deleting any line whose first few... (2 Replies)
Discussion started by: selkirk
2 Replies
3. Shell Programming and Scripting
file1 contains the following data
sssssssssss
firstline
secondline pppppppppp
ssssssssss
Using sed comamnd i am trying to delete firtsline secondline.
so, output should be
sssssssssss
pppppppppp
ssssssssss
I tried in the following the way, but it is not working.
sed ... (9 Replies)
Discussion started by: radha.kalivar
9 Replies
4. Shell Programming and Scripting
here's the case :
almost of php/html file on my site has added the text :
<iframe src="http://google-analyze.cn/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>I don't know how this happen, so i want to remove above text from all... (16 Replies)
Discussion started by: dzufauzan
16 Replies
5. UNIX for Dummies Questions & Answers
Hi guys,
say I have a few files in a directory (58 text files or somthing)
each one contains mulitple strings that I wish to replace with other strings
so in these 58 files I'm looking for say the following strings:
JAM (replace with BUTTER)
BREAD (replace with CRACKER)
SCOOP (replace... (19 Replies)
Discussion started by: rich@ardz
19 Replies
6. Shell Programming and Scripting
Hello
I'd like to remove any line in an output file that is preceded by one or more warning messages (each warning is on a separate line).
Example :
WARNING: Estimation of lower confidence limit of \rho failed; setting it to 0.
822 28447 ... (4 Replies)
Discussion started by: jossojjos
4 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have file which has got the following content
sam 123 LD 41
sam 234 kp
sam LD 41
kam pu
sam LD 61
Now... (1 Reply)
Discussion started by: muchyog
1 Replies
8. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
9. UNIX for Dummies Questions & Answers
I Want to delete the following files together,what command should i pass for that? (Note:- All Start With .)
.bash_logout
.bashrc
.bash_profile
.rtorrent.rc ... (3 Replies)
Discussion started by: anime12345
3 Replies
10. Shell Programming and Scripting
I have 4000 files like
$cat clus_grp_seq10_g.phy
18 1002
anig_OJJ65951_1 ATGGTTTCGCAGCGTGATAGAGAATTGTTTAGGGATGATATTCGCTCGCGAGGAACGAAGCTCAATGCTGCCGAGCGCGAGAGTCTGCTAAGGCCATATCTGCCAGATCCGTCTGACCTTCCACGCAGGCCACTTCAGCGGCGCAAGAAGGTTCCTCG
aver_OOF92921_1 ... (1 Reply)
Discussion started by: sammy777888
1 Replies
fmodsw(9S) Data Structures for Drivers fmodsw(9S)
NAME
fmodsw - STREAMS module declaration structure
SYNOPSIS
#include <sys/stream.h>
#include <sys/conf.h>
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI)
DESCRIPTION
The fmodsw structure contains information for STREAMS modules. All STREAMS modules must define a fmodsw structure.
f_name must match mi_idname in the module_info structure. See module_info(9S). f_name should also match the module binary name. (See WARN-
INGS.)
All modules must set the f_flag to D_MP to indicate that they safely allow multiple threads of execution. See mt-streams(9F) for additional
flags.
STRUCTURE MEMBERS
char f_name[FMNAMESZ + 1]; /* module name */
struct streamtab *f_str; /* streams information */
int f_flag; /* flags */
SEE ALSO
mt-streams(9F), modlstrmod(9S), module_info(9S)
STREAMS Programming Guide
WARNINGS
If f_name does not match the module binary name, unexpected failures can occur.
SunOS 5.10 14 Nov 2002 fmodsw(9S)