06-22-2005
But in using cat you cat have to make fork and exec system calls for the new process, both are expensive calls, by using < to redirect stdin you do not need to make these calls and so as vergsh99 pointed out it would be a UUOC.
Why do you think it would be any different if it were sed?
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I am receving a file from remote site which has EDI information for 830, 862 and 997 and I want to extect the data for 997 using grep's or any other methods.
The data look like this:
ISA~000
0000-0001-1000~997
AK1000~m
000~IEA~M
ISA~000
0000-0001-1000~849
000~IEA~M
ISA~000... (11 Replies)
Discussion started by: isingh786
11 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have some EDI data which 830, 862 and 997. Here is the sample data:
ISA~00~ ~00~ ~ZZ~F159B ~ZZ~U1CAD ~051215~184
3~U~00200~000011432~0~P~<
GS~FA~TC11A~U1CAD~051215~1843~000011432~X~002002
ST~997~0001
AK1~SH~1168
AK2~856~11680001
AK5~A... (2 Replies)
Discussion started by: isingh786
2 Replies
3. Shell Programming and Scripting
Can an expert kindly write an efficient Linux ksh script that will strip rows with no numbers from a text file?
Supposing there are three rows that text file called text.txt :
"field1","field2","field3",11,22,33,44
"field1","field2","field3",1,2,3,4
"field1","field2","field3",,,,
The... (5 Replies)
Discussion started by: ihot
5 Replies
4. Shell Programming and Scripting
Hi
I have a file from which i need to remove the first 4 and the last 2 lines.. i know how to do it with sed but i need to do it in a perl script.. can you please help me how to do that.
Thanks (10 Replies)
Discussion started by: meghana
10 Replies
5. UNIX for Dummies Questions & Answers
I have a couple of datetime fields in a file with contents like below:
ICPBR|6373056085|1|O||||JOHN|SMITH|||H200|706|445668|||123 SMITH ST|LAGRANGE|IL|66666 |||||||N|N|N|N|N|||345676|2009.02.20-13:09:04|257655957|2009.02.20-13:09:04||||N|||||F|||||||||||
I want to strip the time off the... (4 Replies)
Discussion started by: ChicagoBlues
4 Replies
6. Shell Programming and Scripting
Hi,
I've been trying (and failing miserably) all morning to strip from a CSV file the time from it.
Can somebody point me in the right direction on how to do this using sed or awk?
The file looks like:
"James","07/20/2009-14:40:11"
"Steve","08/06/2006-02:34:37"... (5 Replies)
Discussion started by: nmuntz
5 Replies
7. Shell Programming and Scripting
please somebody tell me what is wrong with this, while the thumbnail grabbing works and encoding works, but what is not working is, mv $i.jpg /var/www/thumbs/ and mv $i.mp4 /var/www/uploads/
#!/bin/bash
# MINT 9 - FFMPEG - QT-FASTSTART - X264 - MP4
DIR=/var/www/tmp
for i in... (9 Replies)
Discussion started by: mysoogal
9 Replies
8. Shell Programming and Scripting
Hi everyone,
I hope someone can help me:
i am trying to get some info from a csv file, after i awk the column i need , i made a selection and output it in a file.
now i need to get a list from this file, but i stuck with some fields.
basically i have a text file with next data:
3... (3 Replies)
Discussion started by: lostym
3 Replies
9. Shell Programming and Scripting
I'm coding using BASH and have a requirement to replace apostrophes with backslash apostrophes. For example below:
I am here 'in my room' ok
Would be changed to:
I am here /'in my room/' ok
The original text is coming from a field in a MySql database and is being used by another process that... (5 Replies)
Discussion started by: dbjock
5 Replies
LEARN ABOUT OPENSOLARIS
strip
strip(1) User Commands strip(1)
NAME
strip - strip symbol table, debugging and line number information from an object file
SYNOPSIS
strip [-lVx] file...
DESCRIPTION
The strip command removes the symbol table SHT_SYMTAB and its associated string table, debugging information, and line number information
from ELF object files. That is, besides the symbol table and associated string table, the following sections are removed:
.line
.debug*
.stab*
Once this stripping process has been done, limited symbolic debugging access is available for that file. Therefore, this command is nor-
mally run only on production modules that have been debugged and tested.
If strip is executed on a common archive file (see ar.h(3HEAD)) in addition to processing the members, strip removes the archive symbol ta-
ble. The archive symbol table must be restored by executing the ar(1) command with the -s option before the archive can be linked by the
ld(1) command. strip produces appropriate warning messages when this situation arises.
strip is used to reduce the file storage overhead taken by the object file.
OPTIONS
The amount of information stripped from the ELF object file can be controlled by using any of the following options. The following options
are supported:
-l Strip line number information only.Does not strip the symbol table or debugging information.
-V Prints, on standard error, the version number of strip.
-x Does not strip the symbol table. Debugging and line number information might be stripped.
OPERANDS
The following operand is supported:
file A path name referring to an executable file.
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of strip: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
FILES
/tmp/strp* Temporary files
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWbtool |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
ar(1), as(1), ld(1), mcs(1), elf(3ELF), tmpnam(3C), a.out(4), ar.h(3HEAD), attributes(5), environ(5), standards(5)
NOTES
The symbol table section is not removed if it is contained within a segment or if the file is a relocatable object.
The line number and debugging sections are not removed if they are contained within a segment or if their associated relocation section is
contained within a segment.
The strip command is used to remove a standard predefined set of sections from an ELF object file. To remove a user specified section by
name, see mcs(1).
SunOS 5.11 5 Oct 2007 strip(1)