Sponsored Content
Top Forums Shell Programming and Scripting ksh - adding a dynamic value to the front of a line Post 302274285 by ocelot on Wednesday 7th of January 2009 07:22:20 AM
Old 01-07-2009
Hi zaxxon,

thanks for the reply. The solution kinda works...but only for the first 9 lines. It then appends the rest of the file with "false" or "true", e.g.

HELLO,SIMPLE=HELLO
HELLO,CONFIDENTIAL=false
HELLO,SENDER=false
HELLO,REQUIRED=true
HELLO,FEEDBACK=false
HELLO,UPDATE=false
HELLO,REQUIRED=false
HELLO,MAPPING=true
false,TEST1=true
false,TEST2=false,
false,TEST3=false,
false,TEST4=true

etc... any ideas?

thanks!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

creating a dynamic array in ksh

Hi, Is it possible to create a dynamic array in shell script. I am trying to get the list of logfiles that created that day and put it in a dynamic array. I am not sure about it. help me New to scripting Gundu (3 Replies)
Discussion started by: gundu
3 Replies

2. Shell Programming and Scripting

Dynamic SQl in KSH

My requirement is to create a KSH to generate the SQL select statement in oracle with all the columns and optional where condition if given the table name as input to the program Have any of you worked with a similar requirement? Can you give me some inputs? Regards, Kousikan (2 Replies)
Discussion started by: kousikan
2 Replies

3. Shell Programming and Scripting

sh, ksh: command to remove front spaces from a string?

dear pro-coders, is there any command out there that takes out the front spaces from a string? sample strings: 4 members 5 members 3 members but it has to be like so: 4 members 5 members 3 members (3 Replies)
Discussion started by: pseudocoder
3 Replies

4. Shell Programming and Scripting

Adding a word in front of a word of each line.

Adding a word in front of a word of each line.In that line only one word will be there. pl help:( (4 Replies)
Discussion started by: Ramesh Vellanki
4 Replies

5. Shell Programming and Scripting

adding a character in front of a line

Hi everyon, I am trying to search for a pattern in a file and add "//" to the begining of the file. lets say i want to comment out a line from my codes. the line that should be commented out contains the word "reset". i need to search for the word "reset" and comment out that specific line. is... (5 Replies)
Discussion started by: ROOZ
5 Replies

6. Shell Programming and Scripting

Want to add a word in front a of each line of a file

Hi, Can anybody help me how to add a word in front of a line in a file.Actually it is bit tricky to add a word. i will give a sample for this: Input : 1110001 ABC DEF 1110001 EFG HIJ 1110001 KLM NOP 1110002 QRS RST 1110002 UVW XYZ Output: %HD% 1110001 ABC DEF %DT% 1110001 EFG HIJ... (4 Replies)
Discussion started by: apjneeraj
4 Replies

7. Shell Programming and Scripting

How join line and add | in front

Hello, Did any one know how to use perl join line and add | in front Input--> timestamp=2009-11-10-04.55.20.829347; a; b; c; ddaa; timestamp=2009-11-10-04.55.20.829347; aa; bb; cc; Output--> ... (2 Replies)
Discussion started by: happyday
2 Replies

8. Shell Programming and Scripting

ksh: what does x in front of something mean?

hi, i have stuff like if ]; then what does the x mean? also, what does -z variable mean in an if statement> thanks (8 Replies)
Discussion started by: JamesByars
8 Replies

9. Shell Programming and Scripting

Script for adding a word in front of all line in a file

Hi I've one file full of paths of certain files and I want to add some extra file words in front of all the paths. for eg: i have a file name test.txt which show some details only.. 024_hd/044/0344eng.txt 035_bv/222/editor.jpg here I want to add /usr/people/indiana/ infront of all the... (4 Replies)
Discussion started by: ratheeshp
4 Replies

10. Shell Programming and Scripting

Adding a backslash in front of square brackets with sed

I'm trying to convert this line: to \ with sed. This is what I have so far: sed -e 's/\]*\)\]/\\\\\/' but this still gives me . Any suggestions? (15 Replies)
Discussion started by: lehaste
15 Replies
HWPREFS(1)						    BSD General Commands Manual 						HWPREFS(1)

NAME
hwprefs -- inspect and control low-level system and processor parameters SYNOPSIS
hwprefs [-v] [-h] [cpu_count={1..N}] [cpu_enable {1..N}] [cpu_disable {1..N}] [cpu_l2_cache={true, false}] [cpu_l3_cache={true, false}] [cpu_nap={true, false}] [cpu_hwprefetch={0, 4, 8}] [cpu_nop_dsts={true, false}] [memctl_readbypass={true, false}] [os_class] [os_type] [machine_type] [memory_size] [cpu_type] [cpu_freq] [cpu_bus_freq] [memctl_type] [ioctl_type"] DESCRIPTION
hwprefs inspects and controls low-level system and processor parameters -v verbose mode -h display help message cpu_count={1..N} number of processors available for use by MacOS X cpu_enable {1..N} enable a specific processor cpu_disable {1..N} disable a specific processor cpu_nap={true, false} processor nap cpu_l2_cache={true, false} processor L2 cache cpu_l3_cache={true, false} processor L3 cache cpu_hwprefetch={0, 4, 8} prefetch engines used by hardware prefetcher (PPC970 only): 0 - all prefetch engines disabled, DST instructions treated as NOPs 4 - four automatic hardware prefetch engines, four used by DST instructions 8 - eight automatic hardware prefetch engines, DST instructions treated as NOPs cpu_nop_dsts={true, false} treat DST instructions as nops memctl_readbypass={true, false} memory controller (U3 only) read-bypass optimization (allows read commands to memory to bypass straight to read memory request queue, saving a significant number of cycles) os_class displays OS class {Cheetah, Puma, Jaguar, Smeagol, Panther, Tiger} os_type displays operating system type machine_type displays machine type memory_size displays system memory cpu_type displays processor type and version cpu_freq displays processor clock frequency cpu_bus_freq displays processor bus frequency memctl_type displays memory controller type ioctl_type displays io controller type Darwin December 21, 2005 Darwin
All times are GMT -4. The time now is 04:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy