Sponsored Content
Full Discussion: Can't rcmd with star name
Top Forums Shell Programming and Scripting Can't rcmd with star name Post 303021056 by wbport on Friday 3rd of August 2018 10:02:12 AM
Old 08-03-2018
This morning I tried it again with "ls -l /dir1/dir2/FILEONE*" and that shows up at the top of the log. If I sent it to bb123456, what comes back is
Code:
ls: /dir/dir2/FILEONE-998877.txt not found: No such file or directory (error 2)

That file does not exist on this computer--the remote computers compress it with other files to send it to us. That file does exist on bb998877, though.

I have tried enclosing the entire command in single quotes and double quotes in separate tests. What I get is
Code:
sh: ls /dir1/dir2/FILEONE*:not found

and at linux branches the "sh" is replaced by "bash".

Thanks for looking at it.
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

parsing a STAR tag-value file

I have a recent file I am trying to parse that looks like this: value_one:1:value_two:2:value_three:3 value_one matches to 1 value_two matches to 2 value_three matches to 3 the semi-colons not only seperate the tags to their corresponding values, but also seperate tag/value pairs from... (2 Replies)
Discussion started by: mike@freddiemac
2 Replies

2. What is on Your Mind?

Did you watch Super Star (Thalaivar's) Endhiran Movie?

Robot fever is there throughout the world ! :b: (3 Replies)
Discussion started by: matrixmadhan
3 Replies

3. Red Hat

What is star

I am looking to take the Redhat Certification exam, and one of the guidelines is: Can someone tell me what star is? Thank you. (2 Replies)
Discussion started by: druidmatrix
2 Replies

4. UNIX for Dummies Questions & Answers

How can I replace the lines that start with a star and replace it with numbers start from 1?

I need to replace the (*) in the fist of a list with numbers using sed for example > this file contain a list * linux * computers * labs * questions to >>>> this file contain a list 1. linux 2. computers 3. labs 4. questions (7 Replies)
Discussion started by: aalbazie
7 Replies

5. Solaris

Star/Libre/Open/???-Office for Solaris 11.2 ?

It's been a few years since this topic was last asked and answered.. curious whether anyone knows if the landscape has improved? looking for a more modern release of OpenOffice / LibreOffice / etc than the OOo-3.3 version mentioned in earlier posts from 2012. Would prefer not to compile from... (1 Reply)
Discussion started by: Yeaboem
1 Replies
scandir(3)						     Library Functions Manual							scandir(3)

NAME
scandir, alphasort - Scans or sorts directory contents LIBRARY
Standard C Library (libc.a) SYNOPSIS
#include <sys/types.h> #include <sys/dir.h> int scandir ( char *dir_name, struct dirent * (*name_list[ ]), int (*select) ( struct dirent *dir ), int (*compare) ( struct dirent **dir1, struct dirent **dir2 ) ); int alphasort ( struct dirent **dir1, struct dirent **dir2 ); PARAMETERS
Points to the directory name. Points to the array of pointers to directory entries. Points to a user-supplied function that is called by the scandir() function to select which entries to include in the array. Points to a user-supplied function that sorts the completed array. Points to a dirent structure. Points to a dirent structure. DESCRIPTION
The scandir() function reads the directory pointed to by the dir_name parameter. It then uses the malloc() function to create an array of pointers to directory entries. The scandir() function returns the number of entries in the array and, through the name_list parameter, a pointer to the array. The select parameter points to a user-supplied function that the scandir() function calls to select which entries to include in the array. The selection routine is passed a pointer to a directory entry and returns a nonzero value for a directory entry that is included in the array. If the select parameter is a null value, all directory entries are included. The compare parameter points to a user-supplied function that is passed to the qsort() function to sort the completed array. If the compare parameter is a null value, the array is not sorted. The memory allocated to the array can be deallocated by freeing each pointer in the array, and the array itself, with the free() function. The alphasort() function alphabetically compares the two dirent structures pointed to by the dir1 and dir2 parameters. This function can be passed as the compare parameter to either the scandir() function or the qsort() function. A user-supplied subroutine may also be used. RETURN VALUES
The scandir() function returns -1 if the directory cannot be opened for reading or if the malloc() function cannot allocate enough memory to hold all the data structures. If successful, the scandir() function returns the number of entries found. The alphasort() function returns the following values: Less than 0 (zero): The dirent structure pointed to by the dir1 parameter is lexi- cally less than the dirent structure pointed to by the dir2 parameter. 0 (zero): The dirent structures pointed to by the dir1 parameter and the dir2 parameter are equal. Greater than 0 (zero): The dirent structure pointed to by the dir1 parameter is lexically greater than the dirent structure pointed to by the dir2 parameter. RELATED INFORMATION
Functions: malloc(3), opendir(3), qsort(3) delim off scandir(3)
All times are GMT -4. The time now is 12:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy