04-13-2009
try switching the first and second cut commands, and then removing the -d ' ' altogether.
eval re-executes the results of the cat.....cut command.
why do you want to do that??
i don't see a reason to use eval at all...
what are the results of cat.....cut supposed to look like again?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to use \r as a delimiter in the -d option of the cut comand .
Any help ?
Thanks in advance .
SD (5 Replies)
Discussion started by: shweta_d
5 Replies
2. Shell Programming and Scripting
Hi All,
How can i use the cut option to only output the number of rows, which is 2 is this case ? Pls note that the number of digit before the delimiter ":" is always varying.
$ grep -n uuu xxx
2:** xxx yyy gg 44 tt uuu 2007
$ (2 Replies)
Discussion started by: Raynon
2 Replies
3. Shell Programming and Scripting
I have more than 1000 files to parse. Each file contains few lines (number of lines varies) followed by a header line having all column's name (SPOT, NAME etc) and then values for those columns.
**Example File:
sdgafh
dfhaadfha
sfgaf dhah jkthdj
SPOT NAME GENE_NAME CH_MEAN CHDN_MED ... (11 Replies)
Discussion started by: AshwaniSharma09
11 Replies
4. Shell Programming and Scripting
I need to cut or otherwise get the 4th and 5th position output of
for i in `date +%H` ; do vnstat --dumpdb | grep "h;$i" ; done
example output is:
h;13;1310318701;443;93
I only need ";443;93" from any given run of "for i in `date +%H` ; do vnstat --dumpdb | grep "h;$i" ; done"
Thanks... (3 Replies)
Discussion started by: Habitual
3 Replies
5. Shell Programming and Scripting
HI,
I have a file like below
"103865","103835","Zming","","Zhu","103965","Sunnyvale","US",
"116228","116227","Morlla","","Kowalski","113228","Paese "(Treviso)""IT"
I want to validate the 7th column which is below.
"Sunnyvale"
"Paese
In the above 7th column Paese is not ended with... (9 Replies)
Discussion started by: Krrishv
9 Replies
6. Shell Programming and Scripting
hi all,
suppose a string:
abc/def/ghi/jkl/mn.txt
and i want to get the file name without the path.
however, different files have different paths, therefore the number of delimiter is uncertain.
thanks so much! (3 Replies)
Discussion started by: sunnydanniel
3 Replies
7. Shell Programming and Scripting
Hi all,
I have a number of strings like below:
//mnt/autocor/43°13'(33")W/
and i'm trying to get the numbers in this string, for example
431333
please help
thanks ahead (14 Replies)
Discussion started by: sunnydanniel
14 Replies
8. Shell Programming and Scripting
i have list of names in a text file and I wanted to delete the commas en every line.
for example: inside the text is a list of names in it with commas after each line. I wanted to delete these commas. which command must I execute for this?
unix,
dale,
shawn,
aaron, (4 Replies)
Discussion started by: garfish
4 Replies
9. Shell Programming and Scripting
Hi All-
We have a file data as below with delimiter as |#|
10|#|20|#|ABC
13|#|23|#|PBC
If I want to cut the 2nd field out of this, below command is not working as multiple pipe is causing an issue , it seems
cut -f2 -d"|#|" <file_name>
can you please help to provide the correct command... (7 Replies)
Discussion started by: sureshg_sampat
7 Replies
10. Shell Programming and Scripting
There is a text file in my project named as "mom.txt" in which i want to have contents like..................
LSCRM(Application Name):
1: This is my first application.
2: Today we did shell scripting automation for this app.
3: It was really a good fun in doing so.
4: Really good.| (Here i... (7 Replies)
Discussion started by: Abhijeet Anand
7 Replies
LEARN ABOUT DEBIAN
pg_ctlcluster
PG_CTLCLUSTER(8) Debian PostgreSQL infrastructure PG_CTLCLUSTER(8)
NAME
pg_ctlcluster - start/stop/restart/reload a PostgreSQL cluster
SYNOPSIS
pg_ctlcluster [options] cluster-version cluster-name action -- [pg_ctl options]
where action = start|stop|restart|reload|promote
DESCRIPTION
This program controls the postmaster server for a particular cluster. It essentially wraps the pg_ctl(1) command. It determines the cluster
version and data path and calls the right version of pg_ctl with appropriate configuration parameters and paths.
You have to start this program as the user who owns the database cluster or as root.
ACTIONS
start
A log file for this specific cluster is created if it does not exist yet (by default, /var/log/postgresql/postgresql-cluster-
version-cluster-name.log), and a PostreSQL server process (postmaster(1)) is started on it. Exits with 0 on success, with 2 if the
server is already running, and with 1 on other failure conditions.
stop
Stops the postmaster(1) server of the given cluster. By default, "smart" mode is used, which waits until all clients disconnected.
With the --force option the "fast" mode is used which rolls back all active transactions, disconnects clients immediately and thus
shuts down cleanly. If that does not work, shutdown is attempted again in "immediate" mode, which can leave the cluster in an
inconsistent state and thus will lead to a recovery run at the next start. If this still does not help, the postmaster process is
killed. Exits with 0 on success, with 2 if the server is not running, and with 1 on other failure conditions. This mode should only be
used when the machine is about to be shut down.
restart
Stops the server if it is running and starts it (again).
reload
Causes the configuration files to be re-read without a full shutdown of the server.
promote
Commands a running standby server to exit recovery and begin read-write operations.
OPTIONS
-o option
Pass given option as command line option to the postmaster process. It is possible to specify -o multiple times. See postmaster(1) for
a description of valid options.
pg_ctl options
Pass given pg_ctl options as command line options to pg_ctl. See pg_ctl(1) for a description of valid options.
FILES
/etc/postgresql/cluster-version/cluster-name/pg_ctl.conf
This configuration file contains cluster specific options to be passed to pg_ctl(1).
SEE ALSO
pg_ctl(1), pg_wrapper(1), pg_lsclusters(1), postmaster(1)
AUTHOR
Martin Pitt <mpitt@debian.org>
Debian 2012-10-08 PG_CTLCLUSTER(8)