Sponsored Content
Top Forums Shell Programming and Scripting Remove 5th character from Field1 & Print Post 302150288 by Raynon on Monday 10th of December 2007 11:07:56 PM
Old 12-11-2007
Remove 5th character from Field1 & Print

Hi ,

I need to remove the 5th character of column1 and print the rest.
Can anybody give some advice?


Input:

0001c xx
0001r gg jj
0002y vv
0002p kk
0003q gg ll
0003v tt
0003t gg pp kk


Output:

0001 xx
0001 gg jj
0002 vv
0002 kk
0003 gg ll
0003 tt
0003 gg pp kk
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can we use 'tr' command to print 5th column of output of 'ls -l'

Hi All, I know awk command can do it, but can we use tr command to print 5th column of out put 'ls -l' command???? Regards, Nidhi... (4 Replies)
Discussion started by: Nidhi2177
4 Replies

2. Shell Programming and Scripting

csv file to array, match field1, replace in flat file field1 to field2

Hello, i am bit stuck with making script for automatic procedure. Case: Two files. One is flat file, other is csv file. csv file has two column/fields with comma delimited data. Here is what i need (explained way) CSV file: field1 | field2 "hello","byebye" "hello2","byebye2"... (23 Replies)
Discussion started by: frankie_konin
23 Replies

3. UNIX for Advanced & Expert Users

if 4th and 5th character of sting -ge 45 then add 1 to 3rd character

I want to know how to, given a string like W87151WR71C, if the 4th and 5th character (in this case 15) are greater than 45, then to add 1 to the 3rd character (in this case 7) and assign the revised string the variable name MODSTRING. Thanks in advance. This is ultimately to grab info from... (6 Replies)
Discussion started by: glev2005
6 Replies

4. Shell Programming and Scripting

read the text file and print the content character by character..

hello all i request you to give the solution for the following problem.. I want read the text file.and print the contents character by character..like if the text file contains google means..i want to print g go goo goog googl google like this Using unix Shell scripting... without using... (1 Reply)
Discussion started by: samupnl
1 Replies

5. Shell Programming and Scripting

Remove 5th & 6th <td> from file

I have a page with a 6<td> structure. I need to strip the 5th and 6th <td></td> from the structure. The data in the 4th <td> varies, so I can't get a pattern on it. So, I tried setting up a count of the td occurrence and then remove the 5th and 6th, but I'm not making an progress. Is there an... (0 Replies)
Discussion started by: dba_frog
0 Replies

6. Shell Programming and Scripting

Remove 5th & 6th <td> from file

I have a page with a 6<td> structure. I need to strip the 5th and 6th <td></td> from the structure. The data in the 4th <td> varies, I can't get a pattern on it. So, I tried setting up a count of the td occurrence and then remove the 5th and 6th, but I'm not making any progress. Is there an easy,... (6 Replies)
Discussion started by: dba_frog
6 Replies

7. Shell Programming and Scripting

Script to search for a character in files in a Directory & remove it

Hi All, Am new to both Unix & this Forum - Need some help on a script that I am trying to write: In a Directory i have few text files which might or might not contain some text that I am trying to find. Once that text is found in any of the files, it needs to be removed from the file ... (6 Replies)
Discussion started by: rituparna_gupta
6 Replies

8. Shell Programming and Scripting

Remove previous line if next & previous lines have same 4th character.

I want to remove commands having no output. In below text file. bash-3.2$ cat abc_do_it.txt grpg10so>show trunk group all status grpg11so>show trunk group all status grpg12so>show trunk group all status GCPKNYAIGT73IMO 1440 1345 0 0 94 0 0 INSERVICE 93% 0%... (4 Replies)
Discussion started by: Raza Ali
4 Replies

9. Shell Programming and Scripting

Grep the 5th and 6th position character of a word in a file

I am trying to find/grep the 5th and 6th position character (TX) of a word in a file. I tried to do grep "....TX" file The output gives me everything in the file with TX in it. I only need the output with the TX in the 5th and 6th position of the word. Any idea Example: test1 car... (5 Replies)
Discussion started by: e_mikey_2000
5 Replies

10. Shell Programming and Scripting

How to remove alphabets/special characters/space in the 5th field of a tab delimited file?

Thank you for 4 looking this post. We have a tab delimited file where we are facing problem in a lot of funny character. I have tried using awk but failed that is not working. In the 5th field ID which is supposed to be a integer only of that file, we are getting corrupted data as below. I... (12 Replies)
Discussion started by: Srithar
12 Replies
GRUB-RENDER-LABEL(1)                                               User Commands                                              GRUB-RENDER-LABEL(1)

NAME
grub-render-label - generate a .disk_label for Apple Macs. SYNOPSIS
grub-render-label [OPTION...] [OPTIONS] DESCRIPTION
Render Apple .disk_label. -b, --bgcolor=COLOR use COLOR for background -c, --color=COLOR use COLOR for text -f, --font=FILE use FILE as font (PF2). -i, --input=FILE read text from FILE. -o, --output=FILE set output filename. Default is STDOUT -t, --text=STRING set the label to render -v, --verbose print verbose messages. -?, --help give this help list --usage give a short usage message -V, --version print program version Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options. REPORTING BUGS
Report bugs to <bug-grub@gnu.org>. SEE ALSO
The full documentation for grub-render-label is maintained as a Texinfo manual. If the info and grub-render-label programs are properly installed at your site, the command info grub-render-label should give you access to the complete manual. grub-render-label (GRUB) 2.02-2ubuntu8.3 July 2018 GRUB-RENDER-LABEL(1)
All times are GMT -4. The time now is 06:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy