Tagged Questions
1
vote
1answer
59 views
Parsing the headers of sequence file
I have a multiple sequence file as
>abc|d017961
sequence1......
>cdf|rhtdm9
sequence2......
>ijm|smthr12
sequence3......
>abc|d011wejr
sequence4......
>stg|eethwe77
sequence5......
...
1
vote
2answers
70 views
squid access.log delete entries older than 6 months
Squid generates a log of the accessed sites by the users.
I want to delete the entries in the /var/squid/logs/access.log, which are older than 6 months.
I would execute the script each week. I have ...
0
votes
1answer
122 views
Automation tasks for system administrators [closed]
If I am a junior UNIX/Linux system administrator, and I want to make automation tasks for the server.
I know Shell script, Perl, and Python. All of these are used to make automation tasks.
Which one ...
1
vote
1answer
65 views
how to replace IP address on remote host using expect
I wrote the following expect script in order to replace the IP address on remote Linux machine
I use a perl one-liner for this task
I get errors about can't read "HOME": no such variable ,
Please ...
2
votes
2answers
52 views
ksh + delete number from string
the string IP include some IP address numbers
as the following example
echo ${IP[*]}
192.9.200.1 192.9.200.2 192.9.200.3
is it possible to remove some IP address number from the list ( using ksh ...
1
vote
2answers
84 views
perl one liner + how to match IP address that located in the first/sec field of file
the following perl one liner syntax verify if IP address in "$IP" match the IP ADDRESS in file
perl -ne 'BEGIN{$IP=shift} print if /(^|\s)\Q$IP\E(\s|$)/;' $IP file
file have two fields
as the ...
0
votes
2answers
85 views
perl one liner + print VALUE in the end of the line
The following perl one liner checks if $CURRENT_VERSION matches $NEW_VERSION exactly, and prints it if it does.
Example:
CURRENT_VERSION=223.3.12.4.5.3
NEW_VERSION=223.3.12.4.5.3
DATE=17.3.2013
...
2
votes
1answer
115 views
perl + combine exec command with perl one liner line
I have the following short perl script rename.pl. How can I translate this script to one liner perl syntax? And how to combine the perl one liner in find command?
rename.pl
#!/usr/bin/perl
$op = ...
1
vote
2answers
92 views
renaming a directory and its subdirs without affecting their files
I have to rename directories under the root directory with prefix "ms_PF" and then rename their subdirectories with the modified name of the main directory with an extra "_", and then copy all ...
1
vote
1answer
366 views
Identify text/ascii files in Linux/Solaris
I have a little project to build bash script that search in the OS ( Linux/Solaris ) the current IP address from files and replace them with other IP address.
The problem is that IP address could be ...
1
vote
3answers
358 views
linux/solaris + verify duplicate valid IP address from file
what the best way to find duplicate IP from file ( I have ksh script in this script I need to write function that check for duplicate IP )
for example if IP - 192.1926.23.52 exists twice in file - ...
1
vote
1answer
472 views
Linux + replace STRING/WORD in file according to rule
My target is to replace any word/string/Any characters in file
with new word/string according to the following rules:
If numeric characters on the left side of word/string then we not replace the ...
0
votes
1answer
263 views
linux + perl + replace any WORD in file with special characters with condition
Example1 work fine when I want to replace OLD_TEXT with NEW_TEXT ( its replace also all special characters as $@^%)(_+`:; etc ..)
example1
export OLD_TEXT='$$OLD_WORD$$'
export ...
1
vote
2answers
406 views
What scripting language or platform to use for web page downloads and screen interaction? [duplicate]
Possible Duplicate:
Does anybody here have experience in automating some tasks in web applications using curl?
Here is what I need to do? Wondering what platform is most suited - easy to ...
2
votes
1answer
188 views
Is it a good idea to supplement shell script with perl purely for use of regex?
I'm looking for a simple way to utilize regex in a UNIX shell script where not every system will have perl extensions built into grep. What is really helpful about perl regex here is back/forward ...