Sponsored Content
Top Forums Shell Programming and Scripting Append string to all the files inside a directory excluding subdirectories and .zip files Post 302941865 by Ravi Kishore on Thursday 23rd of April 2015 02:46:49 AM
Old 04-23-2015
Thank you very much Rudic...this worked great

---------- Post updated 04-23-15 at 12:16 PM ---------- Previous update was 04-22-15 at 04:45 PM ----------

Hey, this worked fine when I run through command line,
command:
Code:
for FN in !(*.zip)  ; do [ -d "$FN" ] && continue; mv $FN "appIn1a_$FN"; done

but it gives
syntax error near unexpected token `('

when I use this same in bash script.

Please suggest the changes

Last edited by Scrutinizer; 04-23-2015 at 03:49 AM.. Reason: code tags
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Find Files in a Directory Excluding Subdirectories

Hi, I have a filename Location.txt in a directory /abc. Similar name file is present in its subdirectory /abc/xyz. I want to find the file which is present only in /abc and not in /abc/xyz. Please any1 of u can provide a quick suggestion. Its very urgent. Thanks, Amol (2 Replies)
Discussion started by: Amol_Dicholkar
2 Replies

2. Shell Programming and Scripting

Replace a string in all files under a directory and its subdirectories

Hello Friends, I've been trying to write a script which finds a string and change it with another string. For this i want to search all files (with its arguments) under a spesific directory and its subdirectories. For example lets assume i want to replace an IP= 192.168.0.4 with another... (4 Replies)
Discussion started by: EAGL€
4 Replies

3. UNIX for Dummies Questions & Answers

Zip files inside the directory, but not the directory itself

Hi, Im facing a problem that im stucked, I have the following structure: thales@pereirtc-vbox:/home/VfARM$ ls code config doc lib manifest.bak manifest.rel manifest.v3 ns pub if i try to execute zip -q -o arm.zip VfARM/* it will create a zip file with the folder VfARM.... (2 Replies)
Discussion started by: Thales.Claro
2 Replies

4. Shell Programming and Scripting

Searching for a string in .PDF files inside .RAR & .ZIP archives.

Hi, I have got a large number of .PDF files that are archived in .RAR & ZIP files in various directories and I would like to search for strings inside the PDF files. I would think you would need something that can recursively read directories, extract the .RAR/.ZIP file in memory, read the... (3 Replies)
Discussion started by: lewk
3 Replies

5. UNIX for Dummies Questions & Answers

need to zip all the files excluding todays file

HI All, At present in my server the log folder was filled up and causing memory issue. So I am planning to write a script in such a way that the files which are older than 30 days will be deleted and also need to find the files which were not compressed and need to compress this file.... (4 Replies)
Discussion started by: arumilli
4 Replies

6. Shell Programming and Scripting

Zip all the files including directories - subdirectories

Hi, Is is possible to zip a folder and all its contents within the folder ( including sub-directories and files) into a zip file? and can regain the same structure if unzipped? Thanks (6 Replies)
Discussion started by: rudoraj
6 Replies

7. Shell Programming and Scripting

Find command to search files in a directory excluding subdirectories

Hi Forum, I am using the below command to find files older than x days in a directory excluding subdirectories. From the previous forums I got to know that prune command helps us not to descend in subdirectories. Though I am using it here, not getting the desired result. cd $dir... (8 Replies)
Discussion started by: jhilmil
8 Replies

8. UNIX for Advanced & Expert Users

Find all files in the current directory excluding hidden files and directories

Find all files in the current directory only excluding hidden directories and files. For the below command, though it's not deleting hidden files.. it is traversing through the hidden directories and listing normal which should be avoided. `find . \( ! -name ".*" -prune \) -mtime +${n_days}... (7 Replies)
Discussion started by: ksailesh1
7 Replies

9. Shell Programming and Scripting

Find/searching files in subdirectories excluding the fiels in Parent Directory

Hi All, requirement is to find and remove the files from sub directories but it should exclude the files from parent directory. At present i am using the below one but it finds and remove files from both parent and sub directories. find ${PATH} -type f \( -name securitas\* -o -name \*gz... (1 Reply)
Discussion started by: Naveenkk
1 Replies

10. Shell Programming and Scripting

Unzip all the files with subdirectories present and append a part of string from the main .zip files

Hi frnds, My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on. Iam in need of a bash script so that it unzips... (0 Replies)
Discussion started by: Ravi Kishore
0 Replies
PCLOCK(1)						      General Commands Manual							 PCLOCK(1)

NAME
pclock - pixmap clock SYNOPSIS
pclock [options] DESCRIPTION
This manual page documents briefly the pclock command. This manual page was written for the Debian GNU/Linux distribution because the original program does not have a manual page. pclock is a program that places a small analog clock program on the desktop of X. It was designed to run under the WindowMaker window man- ager. It uses any 64x64 pixmap as a background. OPTIONS
The programs follow the usual GNU command line syntax, with long options starting with two dashes (`-') and short optoins starting with one dash. A summary of options is included below. -B PIXMAP, --background=PIXMAP Use the given pixmap as the clock background (size must be 64x64). -H COLOR, --hands-color=COLOR Draw the hands (hour, minute and second) in the specified color. -S COLOR, --second-hand-color Draw the second hand in the specified color -h, --help Show summary of options. --hour-hand-length=INT Draw the hour hand with the specified length of INT. --minute-hand-length=INT Draw the minute hand with the specified length of INT. --second-hand-length=INT Draw the second hand with the specified length of INT. --second-hand-width=INT Draw the minute hand with the specified width of INT. -s, --second-hand Don't display the second hand. -v, --version Show version of program. -w, --withdrawn Don't start up in a withdrawn (iconic) state. AUTHOR
This manual page was written by Darren Benham <gecko@debian.org>, for the Debian GNU/Linux system (but may be used by others). The soft- ware is copyrighted (c) 1998 by and released under the GPL v2. Author: Alexander Kourakos <Alexander@Kourakos.com> Web: http://www.kourakos.com/~awk/pclock/ PCLOCK(1)
All times are GMT -4. The time now is 02:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy