Sponsored Content
Top Forums UNIX for Dummies Questions & Answers To delete content of many file Post 11649 by rwb1959 on Monday 10th of December 2001 11:23:14 AM
Old 12-10-2001
You can also just do...

> filename

...which truncates an existing file or creates a new
"empty" file
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

I need to delete the content out of a number of logs

I'm just starting out in scripting (taking online classes) but I need to know how to clean out (delete) the content of a number of logs. All of the files end in 'trc'. Does anyone have a script or command (SED or AWK) I can use? Julie (4 Replies)
Discussion started by: Jbolin01
4 Replies

2. Shell Programming and Scripting

how to delete content in a file (delete content only)

Hi Friends I have a file called processLog.txt file processLog.txt --------------- echo "line starts "$LINE suppCode=${LINE:0:3} #gatewayArchive=`scp root@mrp-gateway:/usr/local/apache/data/PLAT/MIMUS/upload/PROD/archive/112042708173000.txt /home/krishnaveni/scripts/tempFolder` #echo... (5 Replies)
Discussion started by: kittusri9
5 Replies

3. Shell Programming and Scripting

Delete content of file 1 in file 2 with shell script

OK, best is I explain what the operating enviroment is. Linux, but Motomagx. It is a Linux operated mobile phone, Motorola V8. I am writting a shell script, but got stuck. I have to delete the complete content of file 1 in file 2. I have attached the 2 files. You can see that the content of... (2 Replies)
Discussion started by: rasputin007
2 Replies

4. Shell Programming and Scripting

how to delete special characters from the file content

Hello Team, Any one suggest how to delte the below special character from a file which is having one column 10 rows of same below content. ---------------------------------------- Kosten|bersicht gemd_ ' =Welche Kosten kvnnen... (2 Replies)
Discussion started by: kanakaraju
2 Replies

5. Shell Programming and Scripting

Delete log files content older than 30 days and append the lastest date log file date

To delete log files content older than 30 days and append the lastest date log file date in the respective logs I want to write a shell script that deletes all log files content older than 30 days and append the lastest log file date in the respective logs This is my script cd... (2 Replies)
Discussion started by: sreekumarhari
2 Replies

6. Shell Programming and Scripting

How to remove exisiting file content from a file and have to append new file content?

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)
Discussion started by: hemanthsaikumar
2 Replies

7. Shell Programming and Scripting

Delete file content by asking user Yes/No...

I have following script to ping multiple ips but i want to delete ip.csv file content after running script .....but before deleting content i have ask user yes/No prompt depend on user input Yes/no ip.csv content will delete.. #!/bin/bash for enodeb in `cat /tmp/ip.csv` do ping -c 2... (3 Replies)
Discussion started by: Ganesh Mankar
3 Replies

8. Shell Programming and Scripting

awk to delete content before and after a matched pattern

Hello, I have been trying to write a script where I could get awk to delete data before and after a matched pattern. For eg Raw data Start NAME = John Age = 35 Occupation = Programmer City = New York Certification Completed = No Salary = 80000 End Start NAME = Mary Age = 25... (2 Replies)
Discussion started by: sidnow
2 Replies

9. UNIX for Beginners Questions & Answers

AIX Delete all mbox content

Hi, How to Delete all mbox content in AIX? Thanks. (2 Replies)
Discussion started by: big123456
2 Replies
xgettext(1)							   User Commands						       xgettext(1)

NAME
xgettext - extract gettext call strings from C programs SYNOPSIS
xgettext [-ns] [ -a [-x exclude-file]] [-c comment-tag] [-d default-domain] [-j] [-m prefix] [-M suffix] [-p pathname] -| filename... xgettext -h DESCRIPTION
The xgettext utility is used to automate the creation of portable message files (.po). A .po file contains copies of "C" strings that are found in ANSI C source code in filename or the standard input if `-' is specified on the command line. The .po file can be used as input to the msgfmt(1) utility, which produces a binary form of the message file that can be used by application during run-time. xgettext writes msgid strings from gettext(3C) calls in filename to the default output file messages.po. The default output file name can be changed by -d option. msgid strings in dgettext() calls are written to the output file domainname.po where domainname is the first parameter to the dgettext() call. By default, xgettext creates a .po file in the current working directory, and each entry is in the same order that the strings are extracted from filenames. When the -p option is specified, the .po file is created in the pathname directory. An existing .po file is overwritten. Duplicate msgids are written to the .po file as comment lines. When the -s option is specified, the .po is sorted by the msgid string, and all duplicated msgids are removed. All msgstr directives in the .po file are empty unless the -m option is used. OPTIONS
The following options are supported: -n Add comment lines to the output file indicating file name and line number in the source file where each extracted string is encountered. These lines appear before each msgid in the following format: # # File: filename, line: line-number -s Generate output sorted by msgids with all duplicate msgids removed. -a Extract all strings, not just those found in gettext(3C), and dgettext() () calls. Only one .po file is created. -c comment-tag The comment block beginning with comment-tag as the first token of the comment block is added to the output .po file as # delimited comments. For multiple domains, xgettext directs comments and messages to the prevailing text domain. -d default-domain Rename default output file from messages.po to default-domain .po. -j Join messages with existing message files. If a .po file does not exist, it is created. If a .po file does exist, new messages are appended. Any duplicate msgids are commented out in the resulting .po file. Domain directives in the existing .po file are ignored. Results not guaranteed if the existing message file has been edited. -m prefix Fill in the msgstr with prefix. This is useful for debugging purposes. To make msgstr identical to msgid, use an empty string ("") for prefix. -M suffix Fill in the msgstr with suffix. This is useful for debugging purposes. -p pathname Specify the directory where the output files will be placed. This option overrides the current working directory. -x exclude-file Specify a .po file that contains a list of msgids that are not to be extracted from the input files. The format of exclude-file is identical to the .po file. However, only the msgid directive line in exclude-file is used. All other lines are simply ignored. The -x option can only be used with the -a option. -h Print a help message on the standard output. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWloc | +-----------------------------+-----------------------------+ SEE ALSO
msgfmt(1), gettext(3C), attributes(5) NOTES
xgettext is not able to extract cast strings, for example ANSI C casts of literal strings to (const char *). This is unnecessary anyway, since the prototypes in <libintl.h> already specify this type. In messages and translation notes, lines greater than 2048 characters are truncated to 2048 characters and a warning message is printed to stderr. SunOS 5.10 23 Mar 1999 xgettext(1)
All times are GMT -4. The time now is 07:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy