Sponsored Content
Full Discussion: one-liner for my script
Top Forums UNIX for Dummies Questions & Answers one-liner for my script Post 302416120 by itkamaraj on Sunday 25th of April 2010 03:40:15 AM
Old 04-25-2010
thanks a lot malcomex,

but where can i study about the arrays in shell ? ( how to apply in awk )

can you guide me.

thanks
kamaraj
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help passing variables in shell script to perl one-liner

I'm writing a script to automate some post-install tasks on RHEL4 servers. I need the following code to insert an 'A' in the middle of a string, then replace the string in a file. I know I can use sed to do this, but I'd like to use perl's in place edit so I don't have to write to a temp file,... (1 Reply)
Discussion started by: Xek
1 Replies

2. Shell Programming and Scripting

Need a script or one-liner to purge lines from a file.

i all. This one sounds so simple, but I can't get it to work. I need to delete lines with certain keywords from a file. I have a file called defaultRules, with keywords: IPSEC_AH IKE_UDP IPMP_TEST_IFACE2 Then, I have another file called rules.txt with some rules: ... (10 Replies)
Discussion started by: BRH
10 Replies

3. Shell Programming and Scripting

Turn an awk one liner into a script?

Hi, I was just helped with an excellent one liner. Now I need to know how to turn it into a script that I can call at the command line. So, this works with file script: ------------ for file in DATA.txt; do awk 'NR==1;NR>1{for (i=1;i<=NF;i++){a+=$i}}END{for (i=1;i<=NF;i++){printf... (3 Replies)
Discussion started by: mikey11415
3 Replies

4. Shell Programming and Scripting

Need a one liner

abc/abc1/abc2/abc3/abc4 i need a script to pick this above path when ever any patterns like the below will be found. abc/abc1 abc/abc1/abc2 abc1/abc2/abc3 abc2/abc3/abc4 abc2/abc3/ etc .... etc..... not only the above 5 but like these one.. any one liner will be of great... (1 Reply)
Discussion started by: debu182
1 Replies

5. Shell Programming and Scripting

help one liner...

Hi I have a log data that shows chunks of data like this: thisis example test, this is example test, this is example test thisis example test, this is example test, this is example test thisis example test, this is example test, this is example test thisis example test, this is example test,... (2 Replies)
Discussion started by: erick_tuk
2 Replies

6. Shell Programming and Scripting

Search & Replace regex Perl one liner to AWK one liner

Thanks for giving your time and effort to answer questions and helping newbies like me understand awk. I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk. Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies

7. Shell Programming and Scripting

Perl one-liner convert to script format problem asking

Input_file_1: ABC1 DEF11 ABC3 DEF7 ABC7 DEF36 Input_file_2: DEF7 light 23 DEF11 over 2 DEF11 over 1 DEF17 blue 0 Perl one-liner that join two input file based on columns sharing a value (In this example, column 2 in Input_file_1 and column 1 in... (3 Replies)
Discussion started by: perl_beginner
3 Replies

8. Shell Programming and Scripting

How can I do one liner import multiple custom .pm files in my perl script?

I am new for Perl I want to ask one question. I have around 50 custom packages which i am using in my Perl script. I want to import all .pm packages in my Perl script in an easy way. Right now i have to import each package individually. So Is there any way to do so?? Right Now i am doing like: ... (1 Reply)
Discussion started by: Navrattan Bansa
1 Replies

9. Shell Programming and Scripting

awk script does not work when written as "one-liner"

In my quest to solve a bigger problem (See my previous post called "Create SQL DML insert statements from file using AWK or similar" - sorry, not allowed to post urls until I have > 5 posts) I'm trying to get my head round awk, but have some problem figuring out why the following script does work... (2 Replies)
Discussion started by: Yagi Uda
2 Replies

10. UNIX for Beginners Questions & Answers

Perl one liner in bash script not replacing hours and minutes [HH:MM]

Hi I want to replace time stamp in the following line PROCNAME.Merge.exchMon.CODE.T_QSTART 08:45 read assuming the new time stamp is 09:45 ; the line is getting replaced as below :45 read I'm trying to use the perl one liner in bash script perl -pi... (4 Replies)
Discussion started by: charlie87
4 Replies
whitelist(5)						      BSD File Formats Manual						      whitelist(5)

NAME
pygs -- the PYthon Gateway Script SYNOPSIS
pygs -t recipient@domain1 -s sender@domain2 [-e envelope@domain3] [-d] [-T] [-V] [-l logfile] [-w whitelist] [-h] DESCRIPTION
NOTE: this man page is to be continued :) pygs read from stdin a nntp article, sending it to recipient@domain1 a rfc822 compliant email setting Resent-Sender: sender@domain2 and enve- lope envelope@domain3 if exists, else sender@domain2. OPTIONS
EXAMPLES
There is some documetation in /urs/share/doc/pyg I created mailgate user (moderator of local.moderated ng). Every article posted in local.moderated is sent to mailgate, in its .procmailrc I've put: :0 bhc * ^To: *local-moderated | $HOME/pygs -t kalfa@localhost -e mailgate@students.cs.unibo.it -s 'cosimo@students.cs.unibo.it' where kalfa@localhost is the recipient (it usually is a mailing list) an header extract from kalfa@localhost mbox: From mailgate@students.cs.unibo.it From: whosentnntparticle@domain4 To: kalfa@localhost Resent-Sender: cosimo@students.cs.unibo.it note that sender and envelope are different. rfc822 says that Sender: have to be a human user (not a program or similia). envelope can mailgate user. AUTHORS
Cosimo Alfarano <alfarano@students.cs.unibo.it> BUGS
Boh. send any bug to the author , please. Debian GNU/Linux July 23, 2000 Debian GNU/Linux
All times are GMT -4. The time now is 12:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy