Hi,
Can anybody suggest me how to combine two strings with two or more white spaces and assign it to a variable?
E.g.
first=HAI
second=HELLO
third="$first $second" # appending strings with more than one white spaces
echo $third
this would print
HAI HELLO
Output appears... (2 Replies)
Hi!
I store some data obtained with grep or awk in a file. The problem is that some lines have white space at the begining :
line1
line2
line3
I use something like
grep WORD INFILE >> OUTFILE
awk >> OUTFILE
I would love if it were possible to remove the white whitout parsing the... (4 Replies)
Hi,
I am trying to remove spaces from the beginning of a string (which i am using in my shell script). For ex - my string looks like this -
" no rows selected"
and i want the string to look like this -
"no rows selected"
How can i achieve this?
Thanks! (18 Replies)
Hello friends,
I have a file which consists of many rows, I use a couple of commands to convert it so i can use in a database query for filtering. I need the first columns (msisdns) in a row, seperated with commas,
9855162267,4,5,2010-11-03 17:02:07.627
9594567938f,5,5,2010-11-02... (9 Replies)
Hi All,
I wanted to know is there any way we can remove white spaces/tabs before & after some pattern { eg. before & after "," }.
Please find below sample data below,
Sat Jul 23 16:10:03 EDT 2011 , 12345678 , PROD , xyz_2345677 , testuuyt , ... (3 Replies)
Discussion started by: gr8_usk
3 Replies
6. Post Here to Contact Site Administrators and Moderators
Hi ,
I want a tcl script to search a string ignoring whitespaces in a .log file . It should correctly match . The string are as follows
"Output-Maps 1 1 0 0 0" 1
and
Active Intermediate-Maps 0 0 0 ... (1 Reply)
Hi ,
I want to search a string in a file ignoring white spaces in TCL.
My string is as follows
Ouput-Maps " 1 1 1 0 " 1i am doing following
set a *1*1*1*0* " }1 abc.log}] but it is not working.
What is the wrong with the tcl script
Thanks
Gouranga
Video... (0 Replies)
I have to export data from table into flat file with | delimited. In the ksh file, I am adding below to do this activity.
$DBSTRING contains the sqlplus command and $SQL_STRING contains the SQL query. File is created properly with the data as per SQL command. I am getting white spaces in the... (1 Reply)
Hi Guys,
Hope, you all are doing good out there.
I am writing a shell script and currrint in need of your help.
This is what I need to do;
I have position based plain file. One of the fields is 15 character long. I need to fill that field. The problem is that the value is dynamic, it could... (4 Replies)
Hi All,
$sed -n "58p" sample
1222017 ---
Its has to display like:
1222017 (5 Replies)
Discussion started by: Anamica
5 Replies
LEARN ABOUT CENTOS
anacrontab
ANACRONTAB(5) File Formats ANACRONTAB(5)NAME
/etc/anacrontab - configuration file for Anacron
DESCRIPTION
The /etc/anacrontab configuration file describes the jobs controlled by anacron(8). It can contain three types of lines: job-description
lines, environment assignments, or empty lines.
Job-description lines can have the following format:
period in days delay in minutes job-identifier command
The period in days variable specifies the frequency of execution of a job in days. This variable can be represented by an integer or a
macro (@daily, @weekly, @monthly), where @daily denotes the same value as the integer 1, @weekly the same as 7, and @monthly specifies that
the job is run once a month, independent on the length of the month.
The delay in minutes variable specifies the number of minutes anacron waits, if necessary, before executing a job. This variable is repre-
sented by an integer where 0 means no delay.
The job-identifier variable specifies a unique name of a job which is used in the log files.
The command variable specifies the command to execute. The command can either be a command such as ls /proc >> /tmp/proc or a command to
execute a custom script.
Environment assignment lines can have the following format:
VAR=VALUE
Any spaces around VAR are removed. No spaces around VALUE are allowed (unless you want them to be part of the value). The specified
assignment takes effect from the next line until the end of the file, or to the next assignment of the same variable.
The START_HOURS_RANGE variable defines an interval (in hours) when scheduled jobs can be run. In case this time interval is missed, for
example, due to a power down, then scheduled jobs are not executed that day.
The RANDOM_DELAY variable denotes the maximum number of minutes that will be added to the delay in minutes variable which is specified for
each job. A RANDOM_DELAY set to 12 would therefore add, randomly, between 0 and 12 minutes to the delay in minutes for each job in that
particular anacrontab. When set to 0, no random delay is added.
Empty lines are either blank lines, line containing white spaces only, or lines with white spaces followed by a '#' followed by an arbi-
trary comment.
You can continue a line onto the next line by adding a '' at the end of it.
In case you want to disable Anacron, add the 0anacron cron job (which is a part of crontab(1)) into the /etc/cron.hourly/jobs.deny direc-
tory.
EXAMPLE
This example shows how to set up an Anacron job similar in functionality to /etc/crontab which starts all regular jobs between 6:00 and
8:00 only. A RANDOM_DELAY which can be 30 minutes at the most is specified. Jobs will run serialized in a queue where each job is started
only after the previous one is finished.
# environment variables
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
RANDOM_DELAY=30
# Anacron jobs will start between 6am and 8am.
START_HOURS_RANGE=6-8
# delay will be 5 minutes + RANDOM_DELAY for cron.daily
1 5 cron.daily nice run-parts /etc/cron.daily
7 0 cron.weekly nice run-parts /etc/cron.weekly
@monthly 0 cron.monthly nice run-parts /etc/cron.monthly
SEE ALSO anacron(8), crontab(1)
The Anacron README file.
AUTHOR
Itai Tzur <itzur@actcom.co.il>
Currently maintained by Pascal Hakim <pasc@(debian.org|redellipse.net)>.
For Fedora, maintained by Marcela Malaova <mmaslano@redhat.com>.
cronie 2012-11-22 ANACRONTAB(5)