Sponsored Content
Full Discussion: How to reform text string?
Top Forums Shell Programming and Scripting How to reform text string? Post 302948224 by Aia on Saturday 27th of June 2015 02:17:41 AM
Old 06-27-2015
Code:
$ printf "%s slots=%s\n" $HOST_LIST
t70c7n133 slots=16
t70c7n134 slots=16
t70c7n135 slots=16
t70c7n136 slots=16
t70c7n137 slots=16
t70c7n138 slots=16
t70c7n140 slots=16
t70c7n141 slots=16

These 5 Users Gave Thanks to Aia For This Post:
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

appending string to text file based on search string

Hi, I need to append string "Hi" to the beginning of the lines containing some specific string. How can I achieve that? Please help. Malay (1 Reply)
Discussion started by: malaymaru
1 Replies

2. Shell Programming and Scripting

Search a string and append text after the string

Hi, I have a file like this... <o t="Batch" id="8410" p="/" g="32"> <a n="name"> <v s="DBBA1MM"/> </a> <a n="owner"> <v r="/Administrator"/> </a> <a n="rights"> <v s="95"/> </a> <a n="debugLevel"> <v s="3"/> </a> <a n="avsStoreLoc"> <v... (8 Replies)
Discussion started by: kesu2k
8 Replies

3. Shell Programming and Scripting

Reform Lines in File without blank lines and spaces

Hello All, I have a file with data as below. Each line consists of 21 fields. I am not able to load them back to the database. 50733339,"834","834 ","005010X279A1","N","Y","007977163","0001 ",30,"2110D ","EB ","EB007 ","2 ","Conditional Required Data Element Miss ing... (3 Replies)
Discussion started by: Praveenkulkarni
3 Replies

4. Shell Programming and Scripting

Search a string in a text file and add another string at the particular position of a line

I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB and add/replace... (1 Reply)
Discussion started by: suryanarayana
1 Replies

5. Shell Programming and Scripting

Search a string in a text file and add another string at the end of line

Dear All I am having a text file which is having more than 200 lines. EX: 001010122 12000 BIB 12000 11200 1200003 001010122 2000 AND 12000 11200 1200003 001010122 12000 KVB 12000 11200 1200003 In the above file i want to search for string KVB... (5 Replies)
Discussion started by: suryanarayana
5 Replies

6. Shell Programming and Scripting

Using sed to get text between a string and next line after another string

Hi folks! I'm trying to get a part of a text inside a text file (sudoers actually) but I'm having trouble. Here is an example of a text: Cmnd_Alias DUMMY = /bin/ls /bin/car /usr/bin/whatever Cmnd_Alias TARGET = test test test test test \ ... (6 Replies)
Discussion started by: leandrorius
6 Replies

7. Shell Programming and Scripting

To Search for a string and to extract the string from the text

Hi Team I have an huge xml where i need to search for a ceratin numbers. For example 2014-05-06 15:15:41,498 INFO WebContainer : 10 CommonServicesLogs - CleansingTriggerService.invokeCleansingService Entered PUBSUB NOTIFY MESSAGE () - <?xml version="1.0" encoding="UTF-8"... (5 Replies)
Discussion started by: Kannannair
5 Replies

8. UNIX for Dummies Questions & Answers

Search String, Out matched text and input text for no match.

I need to search a string for some specific text which is no big deal using grep. My problem is when the search fails to find the text. I need to add text like "na" when my search does not match. I have tried this command but it does not work when I put the command in a loop in a bash script: ... (12 Replies)
Discussion started by: jojojmac5
12 Replies

9. UNIX for Beginners Questions & Answers

Search a string and display its location on the entire string and make a text file

I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file. Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
CHARSET(1)							Linux User's Manual							CHARSET(1)

NAME
charset - Set an ACM for use in one of the G0/G1 charset slots. SYNOPSIS
charset [-v] G0|G1 [cp437|iso01|vt100|user|<acm_name>] DESCRIPTION
The linux console has 2 slots for charsets, labeled G0 and G1. charset changes the slot in use by the current VT to either G0 or G1, and fills the slot either with one of the 3 predefined ACMs (cp437, iso01, vt100) or with a user-defined ACM. You can ask for the current user-defined ACM by specifying user, or ask a new ACM to be loaded from a file into the user slot, by specify- ing a filename. You will note that, although each VT has its own slot settings, there is only one user-defined ACM for all the VTs. That is, whereas you can have tty1 using G0=cp437 and G1=vt100, at the same time as tty2 using G0=iso01 and G1=iso02 (user-defined), you cannot have at the same time tty1 using iso02 and tty2 using iso03. This is a limitation of the linux kernel. Note that you can emulate such a setting using the filterm(1) utility, with your console in UTF8-mode, by telling filterm to translate screen output on-the-fly to UTF8. You'll find filterm(1) in the konwert(1) package, by Marcin Kowalczyk, which is available from http://qrczak.home.ml.org/. OPTIONS
-v be verbose. charset will then print what it does as it does it. BUGS
charset cannot determine which of the 2 slots is in use at a given time, so you have to tell him which one you want, even if you don't want to change to the other one. This is a limitation of the console driver. SEE ALSO
consolechars(8), unicode_start(1), filterm(1). Console tools 10 Aug 1998 CHARSET(1)
All times are GMT -4. The time now is 08:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy