Sponsored Content
Full Discussion: how to put a # in a file
Top Forums Shell Programming and Scripting how to put a # in a file Post 302152161 by invinzin21 on Tuesday 18th of December 2007 11:45:00 PM
Old 12-19-2007
awesome dude Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Take a file from the system and put on tape and reset the file to 0 bytes

:mad: I did this the other day but one of my support personnel removed my history so i could call it back up to remeber the exact command since i am air-headed at times. I am trying to take a 30 MEG file off the system and drop it to tape then i want to make the file go back to being 0 bytes so... (1 Reply)
Discussion started by: JackieRyan26
1 Replies

2. UNIX for Advanced & Expert Users

Put strings around the file name

I have a file(old file) with names in it like Jolly Mirani Han Lee stuart Lloyd I want string to be added to these names . New file should look like 'jolly mirani' 'han lee' 'stuart lloyd' I tried using sed command but doesn't work for string but it do work for paranthesis. Can some one... (3 Replies)
Discussion started by: Jolly
3 Replies

3. Shell Programming and Scripting

TOP out put to a file

How to copy a top output to some file...! i am getting a blank data only top << file1 (2 Replies)
Discussion started by: bullz26
2 Replies

4. Shell Programming and Scripting

Put two lines into one from file

Hello, I have a script that generates the following file named /tmp/rfkill: rf55 pts/13 Jul 10 06:38 (10.72.11.44) 15782 pts/13 5:07 b rf56 pts/15 Jul 10 06:53 (10.72.11.9) 18552 pts/15 0:28 b rf55 pts/39 Jul 10 09:12 (10.72.11.44) 19354 pts/39... (4 Replies)
Discussion started by: raidzero
4 Replies

5. UNIX for Dummies Questions & Answers

I want some selected data from first file and put into other file in specified format

I have a file with follwing content ---------------------------------- SCHEDULE XXXXXXXXX#JOBCOUNT ON EVERYDAY AT 0000 PRIORITY 50 SCHEDULE XXXXXXXXX#ABCDEFGH ON EVERYDAY AT 0001 PRIORITY 29 SCHEDULE... (5 Replies)
Discussion started by: shreyas
5 Replies

6. Shell Programming and Scripting

Get a column from one file and put it in another

I have 2 files that I would need from one file the 3rd column and put into the second file. Preferably in KSH . For example file one has file1: Column 1 Column 2 Column 3 Column 4 Column 5 file2: Column 1 Column 2 Column 3 Column 4 Column 5 So take Column 3 and put into file1 making it... (4 Replies)
Discussion started by: bombcan1
4 Replies

7. Shell Programming and Scripting

split input data file and put into same output file

Hi All, I have two input file and need to generate a CSV file. The existing report just "GREP" the records with the Header and Tailer records with the count of records. Now i need to split the data into 25 records each in the same CSV file. id_file (Input file ) 227050994 232510151... (4 Replies)
Discussion started by: rasmith
4 Replies

8. UNIX for Dummies Questions & Answers

put script into file

hi, ok having here some code like: #!/bin/bash echo " hello " # say hello to the user echo " $HOME " echo " $HOSTNAME " echo " $(uname) " echo " today is $(date) " echo " $(whoami) is currently logged in " now my question is how to change the code so that the info is not... (12 Replies)
Discussion started by: me.
12 Replies

9. Shell Programming and Scripting

Get Data From CSV File and put into a txt file

Hi Guys, File A I have File A as CSV Format.... No R SS MK Par value S AL A1 PKL123 Lo12 1 S AL A2 PKl123 Lo34 22 S AL A3 PkLK234 Lo67 -34 S AL A4 PkLK235 Lo09 120 S AL A5 PkLK236 Lo76 19 S AL A6 PkLK237 Lo44 -17 S AL A7 PkLK238 Lo90 2 S AL A8 PkLK239 Lo34 -9 I want file B like... (4 Replies)
Discussion started by: asavaliya
4 Replies

10. Shell Programming and Scripting

Extract data from a log file and put it in a file

Hi, I would like to seek your help for a script that will extract data from log file and put it in a file. Sample log file 2018-10-23 12:33:21 AI ERROR -- tpid: SAMPLE_TH account: 123456789 aiSessionNumber: 660640464 mapName: xxx to yyy errorDesc: Translation Error:ErrorNumber : 993 ... (2 Replies)
Discussion started by: neverwinter112
2 Replies
mblen(3)						     Library Functions Manual							  mblen(3)

NAME
mblen, mbrlen - Determines the length in bytes of a multibyte character LIBRARY
Standard C Library (libc.so, libc.a) SYNOPSIS
#include <stdlib.h> int mblen( const char *mbs, size_t n); #include <wchar.h> size_t mbrlen( const char *mbs, size_t n, mbstate_t *ps ); STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: mblen(): ISO C, XPG4 mbrlen(): ISO C Refer to the standards(5) reference page for more information about industry standards and associated tags. PARAMETERS
Points to a multibyte-character string. Specifies the maximum number of bytes to consider. Points to an mbstate_t structure that contains the current conversion state of the multibyte-character string. DESCRIPTION
The mblen() function determines the number of bytes in a multibyte character. The behavior of the mblen() function is affected by the LC_CTYPE category of the current locale. In locales with shift-state character encoding, a call to mblen() with a null pointer as the mbs parameter, places the function in the ini- tial shift state. A call to mblen() with an mbs parameter that is not a null pointer may change the shift state for subsequent calls to mblen(), depending on the character examined. Changing the LC_CTYPE category of the locale causes the shift state of the function to be indeterminate. The implementation behaves as though no other function calls the mblen() function. In the case of nonrestartable functions, such as mblen(), conversion to shift-state encoding must first be enabled by calling the function with a null pointer parameter and then calling the function again with the wide-character value to be converted. The status of the conver- sion operation after the call is not available to subsequent calls. The mbrlen() function is a restartable version of mblen(), which means that, for locales that define state-dependent encoding, the shift state for the character in mbs is maintained in the mbstate_t structure and is therefore available to subsequent calls by mbrlen() and other restartable conversion functions. RESTRICTIONS
The mbrlen() and other restartable versions of conversion routines are functional only when used with locales that support shift-state encoding. Currently, the Tru64 UNIX product does not provide any locales that use shift-state encoding. Therefore, the mblen() and mbrlen() functions have the same run-time behavior and always return values for the nonshift-state case. RETURN VALUES
If the mbs parameter is not a null pointer, the mblen() function returns a value determined as follows: The number of bytes in the charac- ter, if the number of bytes is n or fewer and if mbs points to a valid multibyte character other than the null character Zero (0), if mbs points to the null character -1, if mbs does not point to a valid multibyte character or if the length of the character in bytes is more than the value of the n parameter or the MB_CUR_MAX variable In this case, mblen() also sets errno to indicate the error. If mbs is not a null pointer, the mbrlen() function returns the first value that applies in the following list: Zero, if the next n or fewer bytes constitute a null wide character A positive value indicating the number of bytes in the converted multibyte character, if the next n or fewer bytes constitute a valid multibyte character (size_t)-2, if the next n bytes contribute to an incomplete (but potentially valid) multibyte character (size_t)-1, if an encoding error occurs, in which case the next n or fewer bytes do not contribute to a complete and valid multibyte character In this case, the mbrlen() function sets errno to indicate the error and the conversion state is undefined. If the mbs parameter is a null pointer, the mblen() and mbrlen() functions both return one of the following values, depending on whether the current locale supports shift-state character encoding: A nonzero value, if the character encoding is shift-state dependent Zero (0), if the character encoding is not shift-state dependent ERRORS
If the following condition occurs, the mblen() and mbrlen() functions set errno to the corresponding value: The mbs parameter points to an invalid multibyte character. RELATED INFORMATION
Functions: btowc(3), mbsinit(3), mbtowc(3), wctomb(3), mbstowcs(3), wcslen(3), wcstombs(3), wctob(3) delim off mblen(3)
All times are GMT -4. The time now is 09:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy