Sponsored Content
Full Discussion: curious
Top Forums Shell Programming and Scripting curious Post 302240988 by radoulov on Saturday 27th of September 2008 01:33:43 PM
Old 09-27-2008
Code:
for i in 1 2 3; do
  sed 's/Hello/Howdy/g' test$i > test$i.new
  mv test$i.new test$i
done

If you have bash >=3.0 you can avoid the for loop and use brace expansion.
If you have a sed implementation that supports the i switch you can avoid the explicit temporary file:

Code:
$ print Hello >test{1..3}
$ head test*
==> test1 <==
Hello

==> test2 <==
Hello

==> test3 <==
Hello
$ sed -i 's/Hello/Howdy/' test[1-3] 
$ head test*                        
==> test1 <==
Howdy

==> test2 <==
Howdy

==> test3 <==
Howdy

Or just use a more powerful tool:

Code:
perl -i -pe's/Hello/Howdy/' test[1-3]

 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Just curious, does Unix stand for anything?

If not, where did the name come from? (6 Replies)
Discussion started by: pudad
6 Replies

2. UNIX for Dummies Questions & Answers

Curious

Dear All I am curious to know, that in a system compromise, when someone has access to a box, does that individual have access to a shell on the system, i.e. the person is logging into the system using telnet or SSH to remotely access the box?? How does this individual/ hacker access the system. ... (2 Replies)
Discussion started by: skotapal
2 Replies

3. UNIX for Dummies Questions & Answers

Curious Dummy

I have a website but I do not for the life of me know how to upload using unix based command lines. Can someone send me a good site that has these commands. That and I am curious to know more about command line based interfacing. :D Curious Dummy (1 Reply)
Discussion started by: highway39
1 Replies

4. Linux

Curious?

To correct most of the problems with this language, How do I remove the DOS and WORD stuff from it? These come from the fact that it was written on those with a Microsoft supplied platform at the writers request. (1 Reply)
Discussion started by: River Freight
1 Replies

5. UNIX for Advanced & Expert Users

Curious 'ls' Issue

Hi, I am seeing a curious issue with 'ls' command. If I open a telnet session of my Solaris box and give "ls". The output is in 3 columns. a b c d e f g h i j k l However, if I give the same command after a couple of hours in the same window, it goes to 6 columns according to the... (7 Replies)
Discussion started by: vibhor_agarwali
7 Replies

6. UNIX for Dummies Questions & Answers

Curious about the -9

I was talking to a coworker and we got into a discussion about the -9. No one knew where the -9 came from and it's not in the man. I suggested that it was like counting to 10 (0-9) and you finally get to the point that that's it, the durned thing is going to die. So how did the -9 come to mean... (3 Replies)
Discussion started by: pflickner
3 Replies

7. Shell Programming and Scripting

Curious

I dont get something about sed If i have a text file inside contain a:a:a:a:a sed "s/"$title:$author:$price:$qtyAvailable:$qtySold"/"$Ntitle:$author:$price:$qtyAvailable:$qtySold"/" This work!! but If i have a text file inside contain Tom Tom:La La:Di Di :Do Do :De DE It cannot work... (2 Replies)
Discussion started by: GQiang
2 Replies

8. Shell Programming and Scripting

Two curious questions

Hi, I have been thinking about a few things that I have no idea of how to do with a scripting language (awk/sed I know to make proper use of just these 2). 1. Is there a way to have persistent variables? Say a variable that will be held in memory, and which can be accessed by subsequent... (7 Replies)
Discussion started by: jamie_123
7 Replies
rendercheck(1)						      General Commands Manual						    rendercheck(1)

NAME
rendercheck - simple tests of the X Render extension. SYNOPSIS
rendercheck [-d|--display display] [-i|--iter] [--sync] [-t|--tests test1,test2,test3,...] [-o|--ops op1,op2,op3,...] [-v|--verbose] [--minimalrendering] DESCRIPTION
rendercheck is a set of simple tests of the X Render extension. It is designed for authors of Render implementations in X Servers. OPTIONS
-d|--display display Specifies the display to test against. -i|--iter iterations Specifies the number of times to repeat each operation before sampling results. Some X Servers may behave differently (hardware vs software rendering paths) depending on the previous operations done, so this may be used to influence the server's choices. --sync Enables synchronous xlib operation, for debugging. -t|--tests test1,test2,test3... Enables only a specific subset of the possible tests. Test names include fill, dcoords, scoords, mcoords, tscoords, tmcoords, blend, composite, cacomposite, gradients, repeat, triangles, and bug7366. Names must be separated by commas and have no spaces. -f|--formats format1,format2,format3... Enables only a specific subset of the possible formats. Only formats listed in the server-supported format list are available. Names must be separated by commas and have no spaces. -o|--ops Enables only a specific subset of the Render operators. -v|--verbose Enables verbose printing of information on tests run, and successes and failures. --minimalrendering Disables copying of offscreen destinations to the window, which is on by default to provide the user with visual feedback. BUGS
Several limitations are documented in the TODO file accompanying the source. Please report any further bugs you find to http://bugs.freedesktop.org/. AUTHORS
Eric Anholt, with help from Keith Packard. rendercheck(1)
All times are GMT -4. The time now is 09:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy