Sponsored Content
Full Discussion: Argument list too long - SSH
Top Forums UNIX for Dummies Questions & Answers Argument list too long - SSH Post 302324299 by empyrean on Wednesday 10th of June 2009 11:53:25 AM
Old 06-10-2009
i have the files in this format

Code:
pdb1i0t.ent
pdb1lv7.ent
pdb1pp6.ent
pdb1tj2.ent
pdb1xg2.ent
pdb2b4b.ent
pdb2ewe.ent


Now i have to remove the prefix pdb from all the files and also i need to change the extension of .ent to .txt

The new file should look like this

Code:
1iot.txt
1lv7.txt
1pp6.txt


Last edited by radoulov; 02-15-2012 at 06:13 PM.. Reason: Code tags!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Argument list too long - Shell error

Trying to tar specific files from a directory causes problems when the number of files is too large. ls ~/logs | wc -l 5928 In the logs directory - I have 5928 files If I want to include all files with today's date - I run the following command tar cf ~/archive/LoadLogs_20060302.tar... (8 Replies)
Discussion started by: dad5119
8 Replies

2. Shell Programming and Scripting

Argument too long list error

I have a wrote a script which consits of the below line.. Below of this script I'm getting this error "ksh: /usr/bin/ls: arg list too long" The line is log_file_time=`ssh -i $HOME/.ssh/id_rsa -q $i ls -lrt /bp/karthik/test/data/log/$abc*|tail -1|awk '{print $8}'` And $abc alias is as "p |... (1 Reply)
Discussion started by: 22karthikreddy
1 Replies

3. UNIX for Dummies Questions & Answers

Argument list too long for Sed command

Hi guys Following command results in sed -i 's/#/\\#/g' /home/test/sqlstents* -bash: /bin/sed: Argument list too long Please help me solve it.. is there any other way i can do this?.. thanks (4 Replies)
Discussion started by: depakjan
4 Replies

4. Shell Programming and Scripting

Argument list too long problem

I have a huge set of files (with extension .common) in my directory around 2 million. When I run this script on my Linux with BASH, I get /bin/awk: Argument list too long awk -F'\t' ' NR == FNR { a=NR } NR != FNR { sub(".common", "", FILENAME) print a, FILENAME, $1 } '... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

5. Shell Programming and Scripting

Argument list too long for date command

Dear Friends, The following script processes a 14508 lines log file. #!/bin/sh while read line do d=`sed 's/* - * \*\/*\/* *\)\] .*/\1/' | tr '/' ' ' | sed 's/\(*\):\(*\)/\1 \2/'` y=`date -d "${d}" "+%Y%m%d%H%M%S"` echo "${y}" done While running the above script, I am... (4 Replies)
Discussion started by: tamil.pamaran
4 Replies

6. Shell Programming and Scripting

Argument list too long!!

Dear Experts, I have a list of 10K files in a directory. I am not able to execute any commands lile ls -lrt, awk, sed, mv, etc........ I wanna execute below command and get the output. How can I achieve it?? Pls help. root# awk -F'|' '$1 == 1' file_20120710* | wc -l /bin/awk: Argument list... (2 Replies)
Discussion started by: Naga06
2 Replies

7. Shell Programming and Scripting

grep : Argument list too long

Hi, i am having some trouble with the below command, can some one suggest me the better way to do it. grep -l 'ReturnCode=1' `find $Log -newer /tmp/Failed.tmp -print | xargs ls -ld | egrep SUB | egrep -ve 'MTP' -ve 'ABC' -ve 'DEF' -ve 'JKL' -ve 'XYZ' | awk '{print $9}'` > $Home1 Its... (2 Replies)
Discussion started by: Prateek007
2 Replies

8. Shell Programming and Scripting

mv : Argument list too long

Hi I am using find command -- find "directory1" -type f | xargs -i mv {} "directory2" to avoid above argument list too long problem. But, issue i am facing is directory1 is having subdirectories due to this i am facing directory traversal problem as i dont want to traverse subdirectories... (9 Replies)
Discussion started by: VSom007
9 Replies

9. UNIX for Advanced & Expert Users

Argument list too long w/ sed

Hi all, I am using GNU sed (named gsed under macports) in OSX. I have a directory with a series of files named pool_01.jpg through pool_78802.jpg. I am trying to use this command to rename the files to their checksum + extension. md5sum * | gsed -e 's/\(*\) \(.*\(\..*\)\)$/mv -v \2 \1\3/e' ... (3 Replies)
Discussion started by: openthomas
3 Replies

10. Shell Programming and Scripting

Argument list too long

Hi Team, Here's the situation. I have approximately 300000 to 500000 jpg files in /appl/abcd/work_dir mv /appl/abcd/work_dir /appl/abcd/process_dir The above move command will work if the jpg files count is close to 50000 (not sure). If the count is less this mv command holds good. But if... (14 Replies)
Discussion started by: kmanivan82
14 Replies
Mail::SpamAssassin::AsyncLoop(3)			User Contributed Perl Documentation			  Mail::SpamAssassin::AsyncLoop(3)

NAME
Mail::SpamAssassin::AsyncLoop - scanner asynchronous event loop DESCRIPTION
An asynchronous event loop used for long-running operations, performed "in the background" during the Mail::SpamAssassin::check() scan operation, such as DNS blocklist lookups. METHODS
$obj = $async->start_lookup($obj) Register the start of a long-running asynchronous lookup operation. $obj is a hash reference containing the following items: key (required) A key string, unique to this lookup. This is what is reported in debug messages, used as the key for "get_lookup()", etc. id (required) An ID string, also unique to this lookup. Typically, this is the DNS packet ID as returned by DnsResolver's "bgsend" method. Sadly, the Net::DNS architecture forces us to keep a separate ID string for this task instead of reusing "key" -- if you are not using DNS lookups through DnsResolver, it should be OK to just reuse "key". type (required) A string, typically one word, used to describe the type of lookup in log messages, such as "DNSBL", "MX", "TXT". poll_callback (optional) A code reference, which will be called periodically during the background-processing period. If you will be performing an async lookup on a non-DNS-based service, you will need to implement this so that it checks for new responses and calls "set_response_packet()" or "report_id_complete()" as appropriate. DNS-based lookups can leave it undefined, since DnsResolver::poll_responses() will be called automatically anyway. The code reference will be called with one argument, the $ent object. completed_callback (optional) A code reference which will be called when an asynchronous task (e.g. a DNS lookup) is completed, either normally, or aborted, e.g. by a timeout. When a task has been reported as completed via "set_response_packet()" the response (as provided to "set_response_packet()") is stored in $ent->{response_packet} (possibly undef, its semantics is defined by the caller). When completion is reported via "report_id_complete()" or a task was aborted, the $ent->{response_packet} is guaranteed to be undef. If it is necessary to distinguish between the last two cases, the $ent->{status} may be examined for a string 'ABORTING' or 'FINISHED'. The code reference will be called with one argument, the $ent object. zone (optional) A zone specification (typically a DNS zone name - e.g. host, domain, or RBL) which may be used as a key to look up per-zone settings. No semantics on this parameter is imposed by this module. Currently used to fetch by-zone timeouts. timeout_initial (optional) An initial value of elapsed time for which we are willing to wait for a response (time in seconds, floating point value is allowed). When elapsed time since a query started exceeds the timeout value and there are no other queries to wait for, the query is aborted. The actual timeout value ranges from timeout_initial and gradually approaches timeout_min (see next parameter) as the number of already completed queries approaches the number of all queries started. If a caller does not explicitly provide this parameter or its value is undefined, a default initial timeout value is settable by a configuration variable rbl_timeout. If a value of the timeout_initial parameter is below timeout_min, the initial timeout is set to timeout_min. timeout_min (optional) A lower bound (in seconds) to which the actual timeout approaches as the number of queries completed approaches the number of all queries started. Defaults to 0.2 * timeout_initial. $obj is returned by this method. $obj = $async->get_lookup($key) Retrieve the pending-lookup object for the given key $key. If the lookup is complete, this will return "undef". Note that a lookup is still considered "pending" until "complete_lookups()" is called, even if it has been reported as complete via "set_response_packet()" or "report_id_complete()". @objs = $async->get_pending_lookups() Retrieve the lookup objects for all pending lookups. Note that a lookup is still considered "pending" until "complete_lookups()" is called, even if it has been reported as complete via "set_response_packet()" or "report_id_complete()". $async->log_lookups_timing() Log sorted timing for all completed lookups. $alldone = $async->complete_lookups() Perform a poll of the pending lookups, to see if any are completed; if they are, their <completed_callback> is called with the entry object for that lookup. If there are no lookups remaining, or if too long has elapsed since any results were returned, 1 is returned, otherwise 0. $async->abort_remaining_lookups() Abort any remaining lookups. $async->set_response_packet($id, $pkt, $key, $timestamp) Register a "response packet" for a given query. $id is the ID for the query, and must match the "id" supplied in "start_lookup()". $pkt is the packet object for the response. A parameter $key identifies an entry in a hash %{$self->{pending_lookups}} where the object which spawned this query can be found, and through which futher information about the query is accessible. If this was called, $pkt will be available in the "completed_callback" function as "$ent-<gt"{response_packet}>. One or the other of "set_response_packet()" or "report_id_complete()" should be called, but not both. $async->report_id_complete($id,$key,$key,$timestamp) Register that a query has completed, and is no longer "pending". $id is the ID for the query, and must match the "id" supplied in "start_lookup()". One or the other of "set_response_packet()" or "report_id_complete()" should be called, but not both. $time = $async->last_poll_responses_time() Get the time of the last call to "poll_responses()" (which is called from "complete_lookups()". If "poll_responses()" was never called or "abort_remaining_lookups()" has been called "last_poll_responses_time()" will return undef. perl v5.12.1 2010-03-16 Mail::SpamAssassin::AsyncLoop(3)
All times are GMT -4. The time now is 02:09 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy