Sponsored Content
Top Forums Shell Programming and Scripting Some scripts for text files needed Post 302600628 by spuzh on Tuesday 21st of February 2012 03:43:06 PM
Old 02-21-2012
Some scripts for text files needed

Hi,
does anyone have some of those scripts or maybe have idea how to make them?

------------------------------------
1)
block of text multiplication n times:

e.g.
something1 something2 something3
something4 something5 something6

result:
something1 something2 something3
something4 something5 something6

something1 something2 something3
something4 something5 something6

..n times
------------------------------------
2)
put list of strings instead of x:

e.g.
put next strings:
0x0abcd
0x0efgh
...

into text:
something1 something2 something3
something4 x something5
something6 something7

something1 something2 something3
something4 x something5
something6 something7

result:
something1 something2 something3
something4 0x0abcd something5
something6 something7

something1 something2 something3
something4 0x0efgh something5
something6 something7

...
------------------------------------
3)
make increasing range of numbers:

e.g.
something1 x something3
something4 y something5
something6 z something7

something1 x something3
something4 y something5
something6 z something7

result:
something1 1000 something3
something4 1611 something5
something6 2105 something7

something1 1001 something3
something4 1612 something5
something6 2106 something7

...
------------------------------------

Thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Scripts Needed

Hi , am newbie to this forum. I need the script ( any shell ) for the following problems. 1. Write a script to rotate the logs. 2. Write a script to check the file system size and mail the super user about their % used. 3. Write a script to check the amount of space used by each of the... (1 Reply)
Discussion started by: ganeshinforum
1 Replies

2. Shell Programming and Scripting

SED text edit help needed

Could someone please tell me how to delete all lines above a line which contains a particular string? (possibly using SED command) I know how to do this if the target string appears in only one line of file but when it appears in multiple lines it only deletes from the first line which the string... (3 Replies)
Discussion started by: stevefox
3 Replies

3. Shell Programming and Scripting

URGENT: Script/Function needed to read text property files in block wise

Hi, Iam in a need for a script/function in KSH where I want to read a text file (property file) in block by block. Here is the example: Heading Name Descripton Block Block1 Value1 Description Property Name Value Property Name Value Property Name Value Property Name Value Property Name... (7 Replies)
Discussion started by: ysreenivas
7 Replies

4. Shell Programming and Scripting

Shell Script Needed to Read a text from a list files

Hi, Below is my issue which I desperately need and I want a shell script which can do this job. I need this script as I m planning to put this for a system health check. Please assist me. 1. There are 10 log files in a particular location. 2. open each log file. Goto to the end of the... (4 Replies)
Discussion started by: kashriram
4 Replies

5. Shell Programming and Scripting

Scripts - Dynamic text

Hi, I have a file in which I have to replace the text with system date. The text needs to be changed on daily basis automatically. Assume, in "test.txt", I have below lines: LOAD FILE MYFILE 'c:/test/test_2010_09_24.txt ----- ----- In the above, MYFILE value changes every day, the... (1 Reply)
Discussion started by: psnmak
1 Replies

6. Shell Programming and Scripting

Scripting Help needed with a text file.

Hi, Iam a novice to unix shell scripting, need a help from you guys.The scenario is as follows, i have the following Text file. order No Company Category 21 aaa A 24 aaa A 87 aaa B 98 aaa B 23 abc A 45 abc B 25 bbb A 76 wes A 66 ... (6 Replies)
Discussion started by: tech_frk
6 Replies

7. Homework & Coursework Questions

Problem with Shell Scripts deleting text in files.

Me and a friend are working on a project, and We have to create a script that can go into a file, and replace all occurances of a certain expression/word/letter with another using Sed. It is designed to go through multiple tests replacing all these occurances, and we don't know what they will be so... (1 Reply)
Discussion started by: Johnny2518
1 Replies

8. Shell Programming and Scripting

Script help needed(lookup 2 text files)

Hi, iam new to unix scripting need a help. The scenario is i have 2 text files. a.txt has colA colB colC colD JKU1270A JKU1042A 9 1 JKU1270A JKU1042B 9 1 JKU1270A JKU1042C 9 1 JKU1270B JKU1107B 9 1 JKU1270B JKU1107C 9 1... (1 Reply)
Discussion started by: tech_frk
1 Replies

9. UNIX for Beginners Questions & Answers

Text color in Linux scripts via putty

hi Folks, Can anyone help with changing the color of the words in a linux shell script? I get how to change default background etc in putty, but for some reason the text in the script has different colors for different parts of the cript. Is there a way to have one color in a linux shell... (5 Replies)
Discussion started by: jonnyd
5 Replies

10. UNIX for Beginners Questions & Answers

Explanation for Scripts Inner Workings Needed

#!/bin/bash n=$l; typeset -a v x=$(< input.dat) check(){ if; then sed 's/Test/Proc/g' file.sh >fl.sh else exit 13 fi } check $n while ; do x=`expr $x -l` v=$x done less fi.sh l>/dev/null&& echo yes || exit 1 echo v= ${v } exit 0 I have file.sh and input.dat in the current... (3 Replies)
Discussion started by: bananasprite
3 Replies
Tcl_Concat(3)						      Tcl Library Procedures						     Tcl_Concat(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tcl_Concat - concatenate a collection of strings SYNOPSIS
#include <tcl.h> CONST char * Tcl_Concat(argc, argv) ARGUMENTS
int argc (in) Number of strings. CONST char * CONST argv[](in) Array of strings to concatenate. Must have argc entries. _________________________________________________________________ DESCRIPTION
Tcl_Concat is a utility procedure used by several of the Tcl commands. Given a collection of strings, it concatenates them together into a single string, with the original strings separated by spaces. This procedure behaves differently than Tcl_Merge, in that the arguments are simply concatenated: no effort is made to ensure proper list structure. However, in most common usage the arguments will all be proper lists themselves; if this is true, then the result will also have proper list structure. Tcl_Concat eliminates leading and trailing white space as it copies strings from argv to the result. If an element of argv consists of nothing but white space, then that string is ignored entirely. This white-space removal was added to make the output of the concat command cleaner-looking. The result string is dynamically allocated using Tcl_Alloc; the caller must eventually release the space by calling Tcl_Free. | SEE ALSO
| Tcl_ConcatObj | KEYWORDS
| concatenate, strings | Tcl 7.5 Tcl_Concat(3)
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy