I have a requirement where i have to subtitue a word with another word.
a) $eachline will hold a value a path
for example
b)
will give me the value like
removing the last word
my requirement is
so that output will come as
here i am replacing backup by backup_new
Please let me know if i am not clear.
thanks you in advance
Last edited by Franklin52; 07-15-2011 at 04:10 AM..
Reason: Please use code tags for code and data samples, thank you
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
I am creating a menu driven system and i want to show the last login times of different users, instead of using the 'last' command i wanted to know if there is anyway i could make a brief search tool where the user can input which user they are looking for and then the login times for that specific... (2 Replies)
I have a File with the below contents
File1
I have no prior experience in unix. I have just started to work in unix.
My experience in unix is 0. My Total It exp is 3 yrs.
I need to replace the first word in each line with the last word for example
unix have no prior experience in... (2 Replies)
File having data in following format :
file name : file.txt
--------------------
111111;name1
222222;name2
333333;name3
I want to read this file so that I can split these into two paramaters i.e. 111111 & name1 into two different variables(say value1 & value2).
i.e val1=11111 &... (2 Replies)
Hi, i am new to unix shell scripting and i need a script which would search for a particular word in all the files present in a directory. The output should have the word and file path name. For example: "word" "path name".
Thanks for the reply in adv,:) (3 Replies)
I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL.
I need the whole word... (6 Replies)
Hi all
I have following file which I have to edit for research purpose
file:///tmp/moz-screenshot.png body, div, table, thead, tbody, tfoot, tr, th, td, p { font-family: "Liberation Sans"; font-size: x-small; } Drug: KRP-104 QD Drug: Placebo Drug: Metformin|Drug:... (15 Replies)
Hi All,
I am looking for a perl/awk/sed command to auto-increment the numbers line in file, P1.tcl:
run_build_model sparc_ifu_dec
run_drc
set_faults -model path_delay -atpg_effectiveness -fault_coverage
add_delay_paths P1
set_atpg -abort_limit 1000
run_atpg -ndetects 1000
I would like... (6 Replies)
I am trying to figure out to find word count of each word from my file
sample file
hi how are you
hi are you ok
sample out put
hi 1
how 1
are 1
you 1
hi 1
are 1
you 1
ok 1
wc -l filename is not helping , i think we will have to split the lines and count and then print and also... (4 Replies)
I have a multicolumn text file with header in the first row like this
The headers are stored in an array called . which contains I want to search for each elements of this array from that multicolumn text file. And I am using this awk approach
for ii in ${hdr}
do
gawk -vcol="$ii" -F... (1 Reply)
Discussion started by: Atta
1 Replies
LEARN ABOUT DEBIAN
sql::reservedwords::sqlserver
SQL::ReservedWords::SQLServer(3pm) User Contributed Perl Documentation SQL::ReservedWords::SQLServer(3pm)NAME
SQL::ReservedWords::SQLServer - Reserved SQL words by SQL Server
SYNOPSIS
if ( SQL::ReservedWords::SQLServer->is_reserved( $word ) ) {
print "$word is a reserved SQL Server word!";
}
DESCRIPTION
Determine if words are reserved by SQL Server.
METHODS
is_reserved( $word )
Returns a boolean indicating if $word is reserved by SQL Server 7, 2000 or 2005.
is_reserved_by_sqlserver7( $word )
Returns a boolean indicating if $word is reserved by SQL Server 7.
is_reserved_by_sqlserver2000( $word )
Returns a boolean indicating if $word is reserved by SQL Server 2000.
is_reserved_by_sqlserver2005( $word )
Returns a boolean indicating if $word is reserved by SQL Server 2005.
reserved_by( $word )
Returns a list with SQL Server versions that reserves $word.
words
Returns a list with all reserved words.
EXPORTS
Nothing by default. Following subroutines can be exported:
is_reserved
is_reserved_by_sqlserver7
is_reserved_by_sqlserver2000
is_reserved_by_sqlserver2005
reserved_by
words
SEE ALSO
http://msdn2.microsoft.com/en-us/library/ms130214.aspx
AUTHOR
Christian Hansen "chansen@cpan.org"
COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.8.8 2008-03-28 SQL::ReservedWords::SQLServer(3pm)