Sponsored Content
Full Discussion: sed cmd
Top Forums UNIX for Dummies Questions & Answers sed cmd Post 302346116 by thanhdat on Friday 21st of August 2009 04:46:55 AM
Old 08-21-2009
Personally, I think awk is easier in this situation ^^
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

unix cmd

Hi i want a shell script to get the date which is mentioned in the first line of a file. file format is: #EOD rates on 20050228 at 22:06:37 -------- -------- ------- first line length is always fixed. (4 Replies)
Discussion started by: sasi
4 Replies

2. UNIX for Dummies Questions & Answers

man <cmd> >> cmd.txt

I've noticed most of my postings here are because of syntax errors. So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)
Discussion started by: yongho
6 Replies

3. UNIX for Dummies Questions & Answers

mv cmd

Hi All, How can I move only files to another destination using mv cmd in hp-ux. (2 Replies)
Discussion started by: mhbd
2 Replies

4. Shell Programming and Scripting

Inserting a carriage rtn in a sed cmd

I suppose this is a silly newbie Q, but I have a set of text I am inserting into a file using a sed cmd and before I insert, I want to ask the sed operation to move to add a carriage return first, and then place my new line. Is there scope within the sed command to do this - i have tried "\n"... (6 Replies)
Discussion started by: sirtrancealot
6 Replies

5. UNIX for Dummies Questions & Answers

i am not getting any idea how to do the following with SED cmd

hi friends i am not getting any idea about how to implement the following with the help of SED cmd 1)need a sed command that deletes the first character in each line in a file 2)need sed command that deletes the character before the last character in each line in a file ... (7 Replies)
Discussion started by: sankar_vitam
7 Replies

6. Shell Programming and Scripting

sed command works from cmd line to standard output but will not write to file

Hi all .... vexing problem here ... I am using sed to replace some special characters in a .txt file: sed -e 's/_<ED>_/_355_/g;s/_<F3>_/_363_/g;s/_<E1>_/_341_/g' filename.txt This command replaces <ED> with í , <F3> with ó and <E1> with á. When I run the command to standard output, it works... (1 Reply)
Discussion started by: crumplecrap
1 Replies

7. Shell Programming and Scripting

Unix cmd prompt how to get old cmd run?

Hi, I am using SunOS I want to serch my previous command from unix prompt (like on AIX we can search by ESC -k) how to get in SunOs urgent help require. (10 Replies)
Discussion started by: RahulJoshi
10 Replies

8. Shell Programming and Scripting

Perl open(CMD, "cmd |"); buffering problem..

Hello, There's a third-party application's command that shows the application's status like "tail -f verybusy.log". When use the command, the output comes every 1-sec. but when it goes in a script below the output comes every 8-sec...What is the problem and how can I fix it? open(CMD,... (2 Replies)
Discussion started by: Shawn, Lee
2 Replies

9. Shell Programming and Scripting

Embed cmd into sed replacement to have dynamic substitution

Hello, Is it possible to embed the command output to the replacement of sed? Say I need to replace all the blank lines with random strings: input: ACCTTCGTCTTCTGG GCTTGAGATGGTCCA GCAGGGCTAGTGACG GACGAGTCTCTTGAC ACCAAATCAAAGATCand output is: >26aa36d934d44f06d15b3aab4645a602 $(date |... (9 Replies)
Discussion started by: yifangt
9 Replies

10. Shell Programming and Scripting

Help with cmd while using ps

Hi i am new to shell scripting and any help is really appreciated. my requirement is in, ps -e -o pid,uname,cmd how can i split and take only the cmd part from it. I tried awk but the issue is when the cmd is returning a lengthy command which itself has some spaces it is truncating the... (7 Replies)
Discussion started by: Jojo90
7 Replies
English(3pm)						 Perl Programmers Reference Guide					      English(3pm)

NAME
English - use nice English (or awk) names for ugly punctuation variables SYNOPSIS
use English; use English qw( -no_match_vars ) ; # Avoids regex performance penalty # in perl 5.16 and earlier ... if ($ERRNO =~ /denied/) { ... } DESCRIPTION
This module provides aliases for the built-in variables whose names no one seems to like to read. Variables with side-effects which get triggered just by accessing them (like $0) will still be affected. For those variables that have an awk version, both long and short English alternatives are provided. For example, the $/ variable can be referred to either $RS or $INPUT_RECORD_SEPARATOR if you are using the English module. See perlvar for a complete list of these. PERFORMANCE
NOTE: This was fixed in perl 5.20. Mentioning these three variables no longer makes a speed difference. This section still applies if your code is to run on perl 5.18 or earlier. This module can provoke sizeable inefficiencies for regular expressions, due to unfortunate implementation details. If performance matters in your application and you don't need $PREMATCH, $MATCH, or $POSTMATCH, try doing use English qw( -no_match_vars ) ; . It is especially important to do this in modules to avoid penalizing all applications which use them. perl v5.18.2 2014-01-06 English(3pm)
All times are GMT -4. The time now is 01:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy