10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm trying to grab a list of file names from a directory, then process those files 5 at a time. In the link below. Instead of using files I'm using the files array which contains 15 strings starting with AAA.
So I'm trying to assign $fileset 5 of the strings at a time to pass to a command. So... (4 Replies)
Discussion started by: zBernie
4 Replies
2. Shell Programming and Scripting
OS : RHEL 6.1
Shell : Bash
I have lots of files in /tmp/stage directory as show below.
Using a loop, I need to print all the filenames in this directory except those ending with a number. How can I do this ?
# pwd
/tmp/stage
#
#
# ls -l *
-rw-r--r--. 1 root root 0 Oct 7 18:38 stmt1... (2 Replies)
Discussion started by: kraljic
2 Replies
3. Shell Programming and Scripting
i=0
while
do
sizesfor0=`cat 16 | grep 'pickSize' -A 1 | grep '_sz' | cut -d'_' -f1`
sizesfor0=${sizesfor0//id=\"lll/:}
IFS=: array0=( $sizesfor0 )
echo ${array0}
i=$(( $i + 1 ))
done
So, right now I have two variables in the while statement above
sizesfor0 and array0
The... (1 Reply)
Discussion started by: phpchick
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I would like to write a loop to change the names of files in a directory. The files are called data1.txt through data1000.txt. I'd like to change their names to a1.txt through a1000.txt. How do I go about doing that? Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
5. Shell Programming and Scripting
got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies
6. UNIX for Dummies Questions & Answers
I am trying to loop through folders and extract the name of the lowest level subfolder
I was running the script below, it returns
/bb/bin/prd/newyork
/bb/bin/prd/london
/bb/bin/prd/tokyo
I really want
newyork
london
tokyo
I couldn't find a standard variable for the lowest level... (1 Reply)
Discussion started by: personalt
1 Replies
7. UNIX for Dummies Questions & Answers
hai,
I am new to Unix, I have a requirement to display owner name , directory or sub directory name, who's owner name is not equal to "oasitqtc".
(here "oasitqtc" is the owner of the directory or sub directory.)
i have a command (below) which will display all folders and sub folders, but i... (6 Replies)
Discussion started by: gagan4599
6 Replies
8. Shell Programming and Scripting
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Discussion started by: 2reperry
2 Replies
9. Shell Programming and Scripting
Hi All ,
I am having confusion in a shell script. Please guide me.
I need to get multiple files (number of files vary time to time, file names are separated by '|') using FTP get from the remote server.
Actually, i call the FTP function in a loop. At the last step, i need to move all the get... (3 Replies)
Discussion started by: spkandy
3 Replies
10. UNIX for Dummies Questions & Answers
I have a TAR (compressed) file that I uncompressed using the following command
$ tar xvf uagent.tar
It created a directory structure as follows
<root>/arcagent/UAGENT/reloc/$UAGENT_HOME/
How do I access files under the $UAGENT_HOME? Every time I do change directory command, the OS... (3 Replies)
Discussion started by: pkappaz
3 Replies