Sponsored Content
Top Forums UNIX for Dummies Questions & Answers problem editing big file in vi Post 59734 by Quintab on Wednesday 29th of December 2004 04:28:34 PM
Old 12-29-2004
Use sed - a stream editor!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to view a big file(143M big)

1 . Thanks everyone who read the post first. 2 . I have a log file which size is 143M , I can not use vi open it .I can not use xedit open it too. How to view it ? If I want to view 200-300 ,how can I implement it 3 . Thanks (3 Replies)
Discussion started by: chenhao_no1
3 Replies

2. UNIX for Advanced & Expert Users

a BIG problem

dear experts ...help :eek: I'm running FC2 and i was installing fluxbox but it wouldnt work so i uninstalled it by using rpm -e but because i installed fluxbox-styles it was dependent on fluxbox-0.10 so i used rpm -e --nodeps that was all fine and im not sure that was the cause of the error, but... (1 Reply)
Discussion started by: zeeman
1 Replies

3. Shell Programming and Scripting

SED - editing file names (End of line problem?)

For lists in sed, to say what to replace, is this correct: I am hoping that this would recognise that either a "." is present, or that the substitution happens at the end of the line. For files with extensions , my script works perfectly. My problem is, files without extentions, i.e. . ... (1 Reply)
Discussion started by: busillis
1 Replies

4. Programming

please help me with this big makefile problem

I need to create an executable with these two makefiles(they both have libaries i need(qt and ruby)) i have extconf.rb gui.ui gui_include.h main.cpp ScaleIM_client.rb ui_gui.h i want to combine them all into one executable please!... (2 Replies)
Discussion started by: gjgfuj
2 Replies

5. Shell Programming and Scripting

big problem with rm command, please help me!!

Hi every body, well, i made quite a big mistake... In a script, I created a directory called "$PWD" ( it was unwanted...). nothing very frightening with that. The problem is that I wanted to remove it and I used the command rm -f -r $PWD And here is the big mistake!! Rather than deleting... (5 Replies)
Discussion started by: Moumou
5 Replies

6. UNIX for Dummies Questions & Answers

How big is too big a config.log file?

I have a 5000 line config.log file with several "maybe" errors. Any reccomendations on finding solvable problems? (2 Replies)
Discussion started by: NeedLotsofHelp
2 Replies

7. Shell Programming and Scripting

problem in using sed command in editing a file

Hi all, I have a conf file, i want to update some entries in that conf file. Below is the code for that using a temporary file. sed '/workgroup=/ c\workgroup=Workgroup' /usr/local/netx.conf > /usr/local/netx.conf.tmp mv -f /usr/local/netx.conf.tmp /usr/local/netx.conf Sample contents of... (9 Replies)
Discussion started by: ranj14r
9 Replies

8. Shell Programming and Scripting

Problem with searching and then editing a file through shell.

Hi, I have searched through this forum as there are many similar entries but could'nt get one of them to work, either that or they were just different to what I needed. Basically I have a file, recordsDatabase. In this file are a few different fields. There is a unique identifier eg 001... (5 Replies)
Discussion started by: U_C_Dispatj
5 Replies

9. Shell Programming and Scripting

Shell quoting problem while editing a remote file using sed

value of i = solarisbox ssh $i "cat /etc/hosts | sed "s/$i\.local\.//" | sed "s/$i\./$i/" | sed "s/$i/$i.sol.com/" > /usr/users/chidori/edit_hosts"While running the above one liner its i am not able to make the changes and write it to the file /usr/users/chidori/edit_hosts . I know there is a... (2 Replies)
Discussion started by: chidori
2 Replies

10. Shell Programming and Scripting

Editing big file in UNIX

Hi Guys, I have a hugefile. I have requirement to change Indicator from "T" to "P" or from "P" to "T" which comes in header itself. I could not open either in any of editors or in UNIX command line using vi as file size > 3GB Please suggest a solution as how to achieve it through script or any... (10 Replies)
Discussion started by: Abdulhameed M
10 Replies
strccpy(3GEN)					     String Pattern-Matching Library Functions					     strccpy(3GEN)

NAME
strccpy, streadd, strcadd, strecpy - copy strings, compressing or expanding escape codes SYNOPSIS
cc [ flag ... ] file ... -lgen [ library ... ] #include <libgen.h> char *strccpy(char *output, const char *input); char *strcadd(char *output, const char *input); char *strecpy(char *output, const char *input, const char *exceptions); char *streadd(char *output, const char *input, const char *exceptions); DESCRIPTION
strccpy() copies the input string, up to a null byte, to the output string, compressing the C-language escape sequences (for example, , 01) to the equivalent character. A null byte is appended to the output. The output argument must point to a space big enough to accommo- date the result. If it is as big as the space pointed to by input it is guaranteed to be big enough. strccpy() returns the output argument. strcadd() is identical to strccpy(), except that it returns the pointer to the null byte that terminates the output. strecpy() copies the input string, up to a null byte, to the output string, expanding non-graphic characters to their equivalent C-language escape sequences (for example, , 01). The output argument must point to a space big enough to accommodate the result; four times the space pointed to by input is guaranteed to be big enough (each character could become and 3 digits). Characters in the exceptions string are not expanded. The exceptions argument may be zero, meaning all non-graphic characters are expanded. strecpy() returns the output argument. streadd() is identical to strecpy(), except that it returns the pointer to the null byte that terminates the output. EXAMPLES
Example 1: Example of expanding and compressing escape codes. /* expand all but newline and tab */ strecpy( output, input, " " ); /* concatenate and compress several strings */ cp = strcadd( output, input1 ); cp = strcadd( cp, input2 ); cp = strcadd( cp, input3 ); ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |MT-Level |MT-Safe | +-----------------------------+-----------------------------+ SEE ALSO
string(3C), strfind(3GEN), attributes(5) NOTES
When compiling multi-thread applications, the _REENTRANT flag must be defined on the compile line. This flag should only be used in multi- thread applications. SunOS 5.10 29 Dec 1996 strccpy(3GEN)
All times are GMT -4. The time now is 08:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy