Sponsored Content
Top Forums Shell Programming and Scripting SED: language translation of a program Post 302288446 by Whiteboard on Tuesday 17th of February 2009 09:12:57 AM
Old 02-17-2009
Using awk....

Code:
 
awk '{gsub (/ date /, " DATE "); print}' file

 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

need translation?

Can someone tell me exactly what this code is doing? # # gnutest # # Test launch of ghostscript (gs) from a script # rm gnutest.ps # # ------- calculation that would generate file(s) to # be plotted with gnuplot would be placed here ----------- # gnuplot << \E-o-f2 set... (1 Reply)
Discussion started by: wmosley2
1 Replies

2. Shell Programming and Scripting

How to use sed within shell program?

Hi, I tried this with my shell program and it didn't work: /usr/ucb/sed '/$employeeID/d' /usr1/log/logfile How to let sed see my variable employeeID within my shell program? Thanks! (1 Reply)
Discussion started by: whatisthis
1 Replies

3. Shell Programming and Scripting

How to use shell script's to get EPG Program with SED

This is my test script version: #!/bin/sh wget -q -O /tmp/axn 'http://www.axn.pt/programacion/' sed -e '/^$/ d' /tmp/axn > /tmp/temp #Clean black space sed -e 's/<*>//g' /tmp/temp > /tmp/temp1 #Remove HTML rm -f /tmp/temp # Step by step script then clean one by one sed... (3 Replies)
Discussion started by: single
3 Replies

4. UNIX for Advanced & Expert Users

unix awk/sed program

i need a sample unix awk/sed program to replace param3 in a file. i have sample file a.dat with the following format/length (week 8, sku 20, store 20 and qty 8). all store id's which end with _2 needs to be replaced with div id 2. all store id's which end with _1 needs to be replaced with div id... (4 Replies)
Discussion started by: mnnarendra
4 Replies

5. Shell Programming and Scripting

modify and use awk sed program

The following awk script creates a file b.dat. awk '{print substr($0,1,27),substr($2,index($2,"_")+1)," ",substr($0,49)}' a.dat > b.dat I need this script to be modified to also sum $3 values by distinct $1 and $2 fields. Current file W2_2009275 2 8 W2_2009275 2 7 W1_2009275 1... (3 Replies)
Discussion started by: mnnarendra
3 Replies

6. Shell Programming and Scripting

shell program with sed

I want to substitute a charactor "PAN" with "TAN" in a shell, I used sed command in shell, it wo'nt work but the same is run from command prompt it was successful. the command is sed ' s/PAN/TAN/g ' <i/p> > <o/p> sed ' s/^M/^M/g ' <i/p> > <o/p> (1st ^M is Ctrl+V+M, 2nd should be line feed/next... (1 Reply)
Discussion started by: anil_kut
1 Replies

7. Shell Programming and Scripting

looking for expert sed/script help for translation/substitution

Hi All, I'm looking for some expert help on sed/script to work out the best way to transform one xml format into another however there are a few complexities around translation. The extra complexities are to: 1) take the start and stop time (YYYYMMDDHHMMSS) and convert to start time to unix... (8 Replies)
Discussion started by: hotbaws11
8 Replies

8. What is on Your Mind?

The worlds first classical Chinese program language.

WOW, just WOW... It would be mighty interesting to see shell code translated to this. Kudos to the young guy who succeeded... 'https://spectrum.ieee.org/tech-talk/computing/software/classical-chinese?fbclid=IwAR25BRl8ezV4MkiYILJM-zT3_iN4fOu7cq-CkmhN5205YyVXO-IGmXJKiGA' Deliberately put... (3 Replies)
Discussion started by: wisecracker
3 Replies
Padre::Locale::T(3pm)					User Contributed Perl Documentation				     Padre::Locale::T(3pm)

NAME
Padre::Locale::T - Provides _T for declaring translatable strings SYNOPSIS
use Padre::Locale::T; my $string = _T('This is a test'); DESCRIPTION
Padre uses a function called _T to declare strings which should be translated by the translation team, but which should not be immediately localised in memory. This is done primarily because the active language may change between when a string is initially stored in memory and when it is show to a user. The reason we use _T is that most translation tools in the wild that scan the code for a program detect the use of a C macro calls _T that does immediate translation. By creating a null pass through function called _T and the linguistic similarity of Perl to C, we can take advantage of the way translation tools detect translatable strings while keeping the proper Wx::gettext function for strings which do need to be translated immediately. The _T function used to live in Padre::Util, but as that module gradually bloated it was increasing the code of getting the _T function dramatically. Padre::Locale::T declares only this one function, and will only ever do so. Because of this, it also exports by default (although you are still welcome to declare the import if you wish. FUNCTIONS
"_T" The "_T" function is used for strings that you do not want to translate immediately, but you will be translating later (multiple times). The only reason this function needs to exist at all is so that the translation tools can identify the string it refers to as something that needs to be translated. Functionally, this function is just a direct pass-through with no effect. COPYRIGHT
Copyright 2008-2012 The Padre development team as listed in Padre.pm. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-27 Padre::Locale::T(3pm)
All times are GMT -4. The time now is 02:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy