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
weatherrc
weatherrc(5) File Formats Manual weatherrc(5)NAME
weatherrc - configuration file format for the weather(1) utility
DESCRIPTION
The weatherrc file format is intended to specify a set of aliases by which to group URIs for METAR station conditions and alert/forecast
zones, but other command-line options and flags for the weather utility can be specified as well. The file is organized as an INI-format
config, with the alias name in [] brackets and the associated parameter/value pairs on following lines. Parameters and their values are
separated by = or : characters. Multi-word values do not need quoting. These parameters are supported...
alert include local alert notices (possible values are False and True or 0 and 1)
atypes list of alert notification types to display (ex: tornado_warning,urgent_weather_message)
cache control all caching (possible values are False and True or 0 and 1)
cache_data
control retrieved data caching (possible values are False and True or 0 and 1)
cache_search
control search result caching (possible values are False and True or 0 and 1)
cacheage
duration in seconds to refresh cached data (ex: 900)
cachedir
directory for storing cached searches and data (ex: ~/.weather)
conditions
output current conditions (possible values are False and True or 0 and 1)
defargs
list of default command-line arguments (ex: avl,rdu)
forecast
include a local forecast (possible values are False and True or 0 and 1)
headers
list of conditions headers to display (ex: temperature,wind)
imperial
filter/convert conditions for US/UK units (possible values are False and True or 0 and 1)
metric filter/convert conditions for metric units (possible values are False and True or 0 and 1)
quiet skip preambles and don't indent (possible values are False and True or 0 and 1)
setpath
directory search path for correlation sets (ex: .:~/.weather)
verbose
show full decoded feeds (possible values are False and True or 0 and 1)
EXAMPLES
The following is an example ~/.weather/weatherrc defining a couple aliases named home and work to be displayed when running the utility
with no aliases specified...
[default]
defargs = home,work
[home]
description = Conditions and Forecast at Home
forecast = True
metar = http://weather.noaa.gov/pub/data/observations/metar/decoded/KRDU.TXT
zone_forecast = http://weather.noaa.gov/pub/data/forecasts/zone/nc/ncz041.txt
[work]
description = Conditions at Work
metar = http://weather.noaa.gov/pub/data/observations/metar/decoded/KGSO.TXT
Now if weather is invoked by itself on the command line, it will output conditions for home and work, and also a forecast for home only.
AUTHOR
Specification and manual written by Jeremy Stanley <fungi@yuggoth.org>.
SEE ALSO weather(1)2.0 2012-06-24 weatherrc(5)