Sponsored Content
Top Forums Shell Programming and Scripting Want to remove / and character using awk or sed Post 302809799 by aix_admin_007 on Monday 20th of May 2013 07:43:40 PM
Old 05-20-2013
Great worked perfect.....
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

sed to remove character ['

I have a huge file where the each column has data in the format: . I want to remove the from each value. How do I do it with sed? thanks (2 Replies)
Discussion started by: manishabh
2 Replies

2. Shell Programming and Scripting

sed: remove first character from particular line

Hello Experts, I have a file "tt.txt" which is like: #a1=a2 b1=b2 #c1=c2 I need to remove the pound (#) sign from a particular line. In this case let us assume it's 3rd line : "#c1=c2" I can do it through: sed "s/#c1=c2/c1=c2/" tt.txtbut it is possible that I may not know the value... (6 Replies)
Discussion started by: hkansal
6 Replies

3. Shell Programming and Scripting

How to remove space in sed for / character

Hi... i need a script to remove the space before and after the operator like( / ). Ex : Input file apple / manago mango / fresh apple / fresh Desired output: apple/manago mango/fresh apple/fresh Note: betwee the desired operator space should be removed, between words do not remove... (3 Replies)
Discussion started by: vasanth_vadalur
3 Replies

4. Shell Programming and Scripting

Sed is doing my head in! How do you remove the first character of a string?

Hello! Please bare with me, I'm a total newbie to scripting. Here's the sudo code of what I'm trying to do: Get file name Does file exist? If true get length of file name get network id (this will be the last 3 numbers of the file name) loop x 2 If... (1 Reply)
Discussion started by: KatieV
1 Replies

5. Shell Programming and Scripting

any savant ? using AWK/SED to remove newline character between two strings : conditional removal

I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex ) ---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1 -- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
Discussion started by: sieger007
4 Replies

6. Shell Programming and Scripting

Need to remove a character using sed

Hi All, I have output like this below ldprod/03 ldprod/02 ldprod/01 ldprod/00 ldnprod/ ldnprod/030 I want only remove all character including / ldprod ldprod ldprod ldprod ldprod ldnprod (8 Replies)
Discussion started by: ranjancom2000
8 Replies

7. Shell Programming and Scripting

Remove last occurrence of character (_) and rest of the string in UNIX (sed)

Hi I need help on this ..!! Input : xx_abc_regA xx_def_regB xx_qwe_regC Now i required the output as the below abc def qwe Need to remove last occurrence of character (_) and rest of the string in Unix (sed). Thanks in Advance ..!!! -Nallachand (3 Replies)
Discussion started by: Nallachand
3 Replies

8. Shell Programming and Scripting

sed - remove begin of line up to the third and including occurence of character

hello. How to remove all characters in a line from first character ( a $ ) until and including the third occurrence of that character ( $ ). Any help is welcome. (10 Replies)
Discussion started by: jcdole
10 Replies

9. UNIX for Beginners Questions & Answers

Remove character \r and \n in awk

Hi Everybody: I need your help, please... I have this file *.txt 0000 | 16010201 22000000 67892000 00000000 00000000 00000100 72246681 28E08236 | ~~~~"~~~g~ ~~~~~~~~~~~~~r$f~(~~6 | 0020 | 10476173 90010100 10000000 00000001 05000226 17163011 12442212 48140484 |... (2 Replies)
Discussion started by: solaris21
2 Replies

10. Shell Programming and Scripting

Need to remove first and last character using sed

Hi I have file in below format. How i can remove the first and lost comma from this below file ,001E:001F,,,02EE,0FED:0FEF, I need output has below 001E:001F,,,02EE,0FED:0FEF (6 Replies)
Discussion started by: ranjancom2000
6 Replies
CAL(1)							    BSD General Commands Manual 						    CAL(1)

NAME
cal -- displays a calendar SYNOPSIS
cal [-3hjry] [-A after] [-B before] [-d day-of-week] [-R reform-spec] [[month] year] DESCRIPTION
cal displays a simple calendar. If arguments are not specified, the current month is displayed. The options are as follows: -3 Same as ``-A 1 -B 1''. -A after Display after months after the specified month. -B before Display before months before the specified month. -d day-of-week Specifies the day of the week on which the calendar should start. Valid values are 0 through 6, presenting Sunday through Saturday, inclusively. The default output starts on Sundays. -h Highlight the current day, if present in the displayed calendar. If output is to a terminal, then the appropriate terminal sequences are used, otherwise overstriking is used. If more than one -h is used and output is to a terminal, the current date will be high- lighted in inverse video instead of bold. -j Display Julian dates (days one-based, numbered from January 1). -R reform-spec Selects an alternate Gregorian reform point from the default of September 3rd, 1752. The reform-spec can be selected by one of the built-in names (see NOTES for a list) or by a date of the form YYYY/MM/DD. The date and month may be omitted, provided that what is specified uniquely selects a given built-in reform point. If an exact date is specified, then that date is taken to be the first missing date of the Gregorian Reform to be applied. -r Display the month in which the Gregorian Reform adjustment was applied, if no other month or year information is given. If used in conjunction with -y, then the entire year is displayed. -y Display a calendar for the current year. If no parameters are specified, the current month's calendar is displayed. A single parameter specifies the year and optionally the month in ISO format: ``cal 2007-12'' Two parameters denote the month (1 - 12) and year. Note that the century must be included in the year. A year starts on Jan 1. NOTES
In the USA and Great Britain the Gregorian Reformation occurred in 1752. By this time, most countries had recognized the reformation (although a few did not recognize it until the 1900's.) Eleven days following September 2, 1752 were eliminated by the reformation, so the calendar for that month is a bit unusual. In view of the chaotic way the Gregorian calendar was adopted throughout the world in the years between 1582 and 1928 make sure to take into account the date of the Gregorian Reformation in your region if you are checking a calendar for a very old date. cal has a decent built-in list of Gregorian Reform dates and the names of the countries where the reform was adopted: Italy Oct. 5, 1582 Denmark Feb. 19, 1700 Spain Oct. 5, 1582 Great Britain Sep. 3, 1752 Portugal Oct. 5, 1582 Sweden Feb. 18, 1753 Poland Oct. 5, 1582 Finland Feb. 18, 1753 France Dec. 12, 1582 Japan Dec. 20, 1872 Luxembourg Dec. 22, 1582 China Nov. 7, 1911 Netherlands Dec. 22, 1582 Bulgaria Apr. 1, 1916 Bavaria Oct. 6, 1583 U.S.S.R. Feb. 1, 1918 Austria Jan. 7, 1584 Serbia Jan. 19, 1919 Switzerland Jan. 12, 1584 Romania Jan. 19, 1919 Hungary Oct. 22, 1587 Greece Mar. 10, 1924 Germany Feb. 19, 1700 Turkey Dec. 19, 1925 Norway Feb. 19, 1700 Egypt Sep. 18, 1928 The country known as Great Britain can also be referred to as England since that has less letters and no spaces in it. This is meant only as a measure of expediency, not as a possible slight to anyone involved. HISTORY
A cal command appeared in Version 6 AT&T UNIX. BSD
December 21, 2007 BSD
All times are GMT -4. The time now is 07:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy