Hi,
I'm a newbi in shell script. Here what I want to do:
FileA:
bor bor bor
xxxx
bib bib bi
FileB:
something something
something
I want to replace string "xxxx" in FileA with contents of FileB.
i tried with sed:
fileb=`cat FileB`
reg=xxxx
file=FileA (4 Replies)
Hi,
I want to replace _F* by _F in a xml file. what is the sed command.
I have tried sed "s/_F$/_F/g" or sed "s/_F*/_F/g" , but it does not work. thx
file content
<TAG>KC_FOU</TAG>
<TAG>KC_FABC</TAG>
<TAG>KC_FABCDG</TAG>
desire output
<TAG>KC_F</TAG>
<TAG>KC_F</TAG>
<TAG>KC_F</TAG> (6 Replies)
Hi
I have a control file which looks like this
LOAD DATA
INFILE '/home/scott/XXX.dat'
PRESERVE BLANKS
.............
.............
how can i change the content of this file and replace the file in the second line with anothe file name and write it back with another name to the disk?
... (5 Replies)
Our system is receiving one feed from the third party.
One of the field in the flat file is ID which id from position 19 to 27. In some cases this ID is coming as 9 zeros (000000000) or 1 right padded zero. ( 0)
For these specific records I want to replace fthis field with blank... (3 Replies)
Something like vlookup in excel, column 2 in file 2 is blank and should be replaced by column 2 in file 1 based on comparing column 1 in both files.
file1
Code:
1234~abc~b~c~d~e~f~g~h~09/10/09
5678~def~b~c~d~e~f~g~h~12/06/10
8910~hij~b~c~d~e~f~g~h~03/28/13... (1 Reply)
Hi,
My requirement is to find a text and replace it with another in a XML file.
I am new to Unix,Please provide some suggestion to achieve.
Find:
<Style ss:ID="ColumnHeader1">
Replace with:
<Style ss:ID="ColumnHeader1">
<Borders>
<Border ss:Position="Bottom"... (4 Replies)
Hi Gurus,
I need replace multiple files content.
the file name pattern likes currentfile_code_*
the content pattern in the file like text=value
I need replace the content as text=abcde
Thanks in advance (7 Replies)
We have two files
file 1: (usually small, ~100 lines), each line contains a : separated index, value e.g
2: Apple
1: Banana
5: Pear
7: Orange
File 2: (usually large, 10 million lines or more), each line contains a single string value. e.g
xyz1
xyz2
xyz3
xyz4
xyz5
xyz6
xyz7
Now... (2 Replies)
hi all,
i had the below script
x=`cat input.txt |wc -1`
awk 'NR>1 && NR<'$x' ' input.txt > output.txt
by using above script i am able to remove the head and tail part from the input file and able to append the output to the output.txt but if i run it for second time the output is... (2 Replies)
Hi,
I am having a files in my directory like this:
2014 1049_file1.txt
2014 1050_file2.txt
2014 1110_file3.txt
2014 1145_file4.txt
2014 2049_file5.txt
I need to replace the above file names like this without changing the content of filename:
file1.txt
file2.txt
file3.txt... (10 Replies)
Discussion started by: rohit_shinez
10 Replies
LEARN ABOUT SUNOS
gcore
gcore(1) User Commands gcore(1)NAME
gcore - get core images of running processes
SYNOPSIS
gcore [-pgF] [-o filename] [-c content] process-id...
DESCRIPTION
The gcore utility creates a core image of each specified process. By default, the name of the core image file for the process whose process
ID is process-id will be core.process-id.
OPTIONS
The following options are supported:
-c content Produces core image files with the specified content. The content description uses the same tokens as in coreadm(1M). The
-c option does not apply to cores produced due to the -p or -g flags.
-F Force. Grabs the target process even if another process has control.
-g Produces core image files in the global core file repository with the global content as configured by coreadm(1M). The com-
mand will fail if the user does not have permissions to the global core file repository.
-o filename Substitutes filename in place of core as the first part of the name of the core image files. filename can contain the same
tokens to be expanded as the paths in coreadm(1M).
-p Produces a core image file in the process-specific location with the process-specific content for each process as config-
ured by coreadm(1M). The command will fail if the user does not have permissions to the per-process core file repository.
OPERANDS
The following operand is supported:
process-id process ID
EXIT STATUS
The following exit values are returned:
0 On success.
non-zero On failure, such as non-existent process ID.
FILES
core.process-id core images
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWtoo |
+-----------------------------+-----------------------------+
|Interface Stability |See below. |
+-----------------------------+-----------------------------+
Command Syntax is Evolving. Output Format(s) are Unstable.
SEE ALSO kill(1), coreadm(1M), setrlimit(2), core(4), proc(4), attributes(5)NOTES
gcore is unaffected by the setrlimit(2) system call using the RLIMIT_CORE value.
SunOS 5.10 11 Feb 2004 gcore(1)