03-26-2008
Quote:
Originally Posted by
melanie_pfefer
Hi and thanks for your replies.
Actually I was not clear in my first post
the output of the perl/sed/head will be displayed on stdout. I expect the result to be in the file itself and not on the stdout. i.e. the result will should be a shorter file (without creating a new file)
[...]
You were clear,
but you didn't try the commands I suggested
And, of course, bakunin is rigth,
these commands use temporary files implicitly.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I am passing a filename to a script to draw parameters from it. However, I want to use part of the filename as a parameter. The filename is transfer_ccf_3731_10.sh but I only need the 3731_10 part of it.
Is this possible? Any help or suggestions would be appreciated!
Regards,
J. (4 Replies)
Discussion started by: JWilliams
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a 6G log , which is unusual to read and I want to minimize it by removing some part on the upper portion( around 4GB). what should i do? can you please help me?
thanks. (1 Reply)
Discussion started by: tungaw2004
1 Replies
3. Shell Programming and Scripting
Hi all,
I've been looking for how to eliminate blank spaces in a variable or strings. I've seen several ways, using sed, awk and even python. One of them is use 'tr' command, but it does not work as I expected: For example:
echo " stuff " | tr -s " "leaves one space ahead and another... (3 Replies)
Discussion started by: AlbertGM
3 Replies
4. Shell Programming and Scripting
1) I want to trim the zeros of the 1st file so they match the second file
2) run an automatic diff and error in lines that dont match
File1
0.8035500
1.4138000
1.6381500
1.9256110
3.8075000
13.3270000
13.4155000
94.2700000
937.7000000
File2
0.80355
1.4138
1.63815
3.8075
1.925611... (5 Replies)
Discussion started by: sigh2010
5 Replies
5. Shell Programming and Scripting
Hi All,
I have a file named as
FAB1_600015_CONRAD.A0_7XYZ12345.000_LT-SWET.01_LTPA25L_20110622-161429_07_WFR12345_20110622-161429_20110712-125228.data.dis
I want to generate a directory taking only the 7XYZ12345.000_WFR12345
The length and format of the Filename will be the same... (2 Replies)
Discussion started by: asheshrocky
2 Replies
6. Shell Programming and Scripting
I am trying to trim spaces for the fixed width file starting from location 129 and of length 20.
I am expecting only around 40 records that will have length greater than 9. But i am getting around 4000 records.
Please help me correct the following.
nawk '{if (a=length(gsub(/... (2 Replies)
Discussion started by: pinnacle
2 Replies
7. Shell Programming and Scripting
All,
i am comparing the output of one command to a numberic
if ]
but my problem is the output of follwoing is but but has some leading columns. I don't have any problme in LINUX and HP-UX. But only in AIX i am getting the leading spaces. I have developed my script on LINUX but when... (4 Replies)
Discussion started by: rcc50886
4 Replies
8. Shell Programming and Scripting
Hi,
I wish to grep everything before the last "/bin" in the following string
/opt/app/bin/app1/jdk150_07/bin/IA64N/java
Desired output: "/opt/app/bin/app1/jdk150_07"
Kindly help ... (2 Replies)
Discussion started by: mohtashims
2 Replies
9. Shell Programming and Scripting
i am passing below inputfils using while loop and ouput should be trim as below
INPUT:
src_SPS_d_Comment_Tran_File_20130417_001.dat
src_SPS_d_Corp_Adv_Tran_File_20130417_001.dat
src_SPS_d_Letter_Tran_File_20130417_001.dat
src_SPS_d_Loan_Level_File_20130417_001.dat... (8 Replies)
Discussion started by: katakamvivek
8 Replies
10. Shell Programming and Scripting
In Shell, I have output of a unix command as
test1
test2015
but I want it as
test1 test2015
can anyone help me out.
Use code tags, thanks. (3 Replies)
Discussion started by: OscarS
3 Replies
LEARN ABOUT OSX
urn-scheme
uri_urn(n) Tcl Uniform Resource Identifier Management uri_urn(n)
__________________________________________________________________________________________________________________________________________________
NAME
uri_urn - URI utilities, URN scheme
SYNOPSIS
package require Tcl 8.2
package require uri::urn ?1.1.2?
uri::urn::quote url
uri::urn::unquote url
_________________________________________________________________
DESCRIPTION
This package provides two commands to quote and unquote the disallowed characters for url using the urn scheme, registers the scheme with
the package uri, and provides internal helpers which will be automatically used by the commands uri::split and uri::join of package uri to
handle urls using the urn scheme.
COMMANDS
uri::urn::quote url
This command quotes the characters disallowed by the urn scheme (per RFC 2141 sec2.2) in the url and returns the modified url as its
result.
uri::urn::unquote url
This commands performs the reverse of ::uri::urn::quote. It takes an urn url, removes the quoting from all disallowed characters,
and returns the modified urls as its result.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category uri of
the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
KEYWORDS
rfc 2141, uri, url, urn
CATEGORY
Networking
uri 1.1.2 uri_urn(n)