STEP 1
# Set variable
FILE=/tmp/mainfile
SEARCHFILE =/tmp/searchfile
# THIS IS THE MAIN FILE.
cat /tmp/mainfile
Interface Ethernet0/0 "outside", is up, line protocol is up
Hardware is i82546GB rev03, BW 100 Mbps
Full-Duplex(Full-duplex), 100 Mbps(100 Mbps)
MAC address... (6 Replies)
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Hi
Trying to do like this :
echo "$variable1\n $(cat file.txt)"
but it only adds one time. When I run this cmd again with different variable it only replaces line of variable1.
How to add constantly line into first line in file ? (3 Replies)
Hi ,
I am trying to write an shell, which reads a text file (from a location) having a list of numbers of strictly 5 digits only ex: 33144
Now my script will check :
1) that each entry is only 5 digits & numeric only, no alphabets, & its not empty.
2)then it executes a shell script called... (8 Replies)
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
Hi All,
I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
I have a file
file_name_O.txt
The file can have different number of other files names or nothing
I will check
cnt=`wc -l file_name_0.txt`
if ;then
exit 1
fi
Now I have to start checking file names, i.e. read txt file line by line. If amount of ,lines equal 1, I can... (4 Replies)
ALTER INDEX(7) SQL Commands ALTER INDEX(7)NAME
ALTER INDEX - change the definition of an index
SYNOPSIS
ALTER INDEX name RENAME TO new_name
ALTER INDEX name SET TABLESPACE tablespace_name
ALTER INDEX name SET ( storage_parameter = value [, ... ] )
ALTER INDEX name RESET ( storage_parameter [, ... ] )
DESCRIPTION
ALTER INDEX changes the definition of an existing index. There are several subforms:
RENAME The RENAME form changes the name of the index. There is no effect on the stored data.
SET TABLESPACE
This form changes the index's tablespace to the specified tablespace and moves the data file(s) associated with the index to the new
tablespace. See also CREATE TABLESPACE [create_tablespace(7)].
SET ( storage_parameter = value [, ... ] )
This form changes one or more index-method-specific storage parameters for the index. See CREATE INDEX [create_index(7)] for details
on the available parameters. Note that the index contents will not be modified immediately by this command; depending on the parame-
ter you might need to rebuild the index with REINDEX [reindex(7)] to get the desired effects.
RESET ( storage_parameter [, ... ] )
This form resets one or more index-method-specific storage parameters to their defaults. As with SET, a REINDEX might be needed to
update the index entirely.
PARAMETERS
name The name (possibly schema-qualified) of an existing index to alter.
new_name
The new name for the index.
tablespace_name
The tablespace to which the index will be moved.
storage_parameter
The name of an index-method-specific storage parameter.
value The new value for an index-method-specific storage parameter. This might be a number or a word depending on the parameter.
NOTES
These operations are also possible using ALTER TABLE [alter_table(7)]. ALTER INDEX is in fact just an alias for the forms of ALTER TABLE
that apply to indexes.
There was formerly an ALTER INDEX OWNER variant, but this is now ignored (with a warning). An index cannot have an owner different from its
table's owner. Changing the table's owner automatically changes the index as well.
Changing any part of a system catalog index is not permitted.
EXAMPLES
To rename an existing index:
ALTER INDEX distributors RENAME TO suppliers;
To move an index to a different tablespace:
ALTER INDEX distributors SET TABLESPACE fasttablespace;
To change an index's fill factor (assuming that the index method supports it):
ALTER INDEX distributors SET (fillfactor = 75);
REINDEX INDEX distributors;
COMPATIBILITY
ALTER INDEX is a PostgreSQL extension.
SEE ALSO
CREATE INDEX [create_index(7)], REINDEX [reindex(7)]
SQL - Language Statements 2010-05-14 ALTER INDEX(7)