Hello,
I have the following to remove spaces from beginning and end of a string.
infile=`echo "$infilename" | sed 's/^ *//;s/ *$//`
How do I modify the above code to remove spaces from beginning, end and in the middle of the string also.
ex:
... (4 Replies)
Hello and thx for reading this
I'm using sed to remove only the leading spaces in a file
bash-280R# cat foofile
some text
some text
some text
some text
some text
bash-280R#
bash-280R# sed 's/^ *//' foofile > foofile.use
bash-280R# cat foofile.use
some text
some text
some text... (6 Replies)
if the answer is obvious, sorry, I'm new here.
anyway, I'm using tr to encrypt with rot-13:
echo `cat $script | tr 'a-zA-Z' 'n-za-mN-ZA-M'` > $script
it works, but it removes any consecutive spaces so that there is just one space between words. I've had this problem before while using sed to... (5 Replies)
Hi all,
i am getting count from oracle 11g by spooling it to a file.
Now there are some newline characters and blank spaces i need to remove these.
pl provide me a awk/sed solution.
the spooled file is attached.
i tried this.. but not getting req o/p (6 Replies)
Hello all,
I have a problem with a bash script. It contains an MySQL query, which when I run it 'as is', executes without a problem.
When, however, I try to get it to assign its output to a variable, using the backtick, I get errors.
So ..
/usr/bin/mysql -N -B mydatabase -e 'SELECT... (3 Replies)
Hi, I have data that looks similar to this:
In which the sentences are written horizontally and the beginning of a sentence is indicated by a 1 in the first column and the number increments until the last item of the sentence. The end of the sentence and the beginning of the next is then indicate... (1 Reply)
hi all ,
i had the below sed command to append header at the starting of my output file ....
sed -i -e '1i saikumar suresh hemanth' output.txt
i want to append spaces to the Name saikumar how can i append with in this command ....? (1 Reply)
The following command works echo "some text with spaces" | sh -c 'sed -e 's/t//g''But this doesn't and should echo "some text with spaces" | sh -c 'sed -e 's/ //g''Any ideas? (3 Replies)
Discussion started by: Tribe
3 Replies
LEARN ABOUT DEBIAN
metar
METAR(1) metar METAR(1)NAME
metar - A METAR downloader/decoder
SYNOPSIS
metar [-dvh] stations
DESCRIPTION
METAR reports are meteorological weather reports for aviation. metar is a small program which downloads weather reports for user-specified
stations and optionally decodes them into a human-readable format.
Aviation weather stations are commonly referred to by ICAO designator. The ICAO is the International Civil Aviation Organization, a inter-
national standardization body for civil organization. For example, KJFK is the ICAO identifier for John F. Kennedy Airport in New York, New
York, EHAM is the ICAO identifier for Amsterdam Schiphol Airport, The Netherlands, etc.
OPTIONS
metar requires at least one station identifier to run. A full list of ICAO stations is available for download at
http://weather.noaa.gov/data/nsd_bbsss.txt.
metar supports three additional options:
-d Decode the retrieved weather reports into a human-readable format.
-v Be verbose while retrieving a report.
-h Show a short help summary
ENVIRONMENT
If the environment variable METARURL is set, metar will attempt to download the weather report from that location, rather than from the
default (the NOAA web site). The value of METARURL will be postfixed with the capitalized station ID, followed by the .TXT extension.
For example, if you have METAR reports in your home directory, setting METARURL to $HOME and asking for the weather report of ehgr will
result in the file $HOME/EHGR.TXT to be read.
AUTHOR
Kees Leune <kees@leune.org>
metar 20061030.1 2005-04-08 METAR(1)