Hi
I am trouble parsing through a file with spaces in the filename. I need to grab "supportIDPS/SCM/windows_install/file groups/dds.fgl" and then do a md5sum on it. I am using sh.
Any help is appreciated.
Here is an example of the input file:
7eedbc9f7902bf4c1878d9e571addf9a ... (4 Replies)
Hi,
I grep for a pattern in a list of files.
"grep -i -l $pattern *.datx*"
it may give me n number of files.
say for eg, it gives me 2 files.
lock_eicu_20071228_00000000.dat_20071228_05343100
lock_eicu_20080501_00000000.dat_20080501_05343900
out of these 2 files I need to get the... (7 Replies)
I have to to read files simultaneously in two nested loops,but am getting error can anyone do the needful.
useridFile=userIds.txt
fname=kiran.txt
exec<$useridFile
while read line
do
echo "User IDs are..$line"
USER_ID=$line
REMOTE_DIR_LOCATION="/home/test/$USER_ID"
SOURCE_DIR=$USER_ID... (1 Reply)
I am using the following code to read filename from the directory:
for i in ` ls $inputDir | grep $partialName*.csv`
do
echo $i
done
But the echo is giving me the following:
ls | grep cm_ctx*.csv instead of the full filename "cm_ctx_2009_07_15_17_18.csv"
Any ideas anyone? I... (2 Replies)
Im trying to set a filename to a variable and then read the file in using the variable but im getting a syntax error. any ideas?
#!/bin/bash
function scanFile()
{
while read $1
do
echo $filename
done
}
file1=report.log
scanFile() $file1 (3 Replies)
Hi,
I am searching for a file named "Backup.txt" but I don't know in which directory it is.
Can someone tell me, how I can search recursiv in all directories and subdirectories?
thanks (2 Replies)
I need to construct a command that finds directories which contains more than n matches of a certain filename.
E.g. I have many directories at different locations and want to find all directories that has 2 or more .dat-files.
I thought of using find and maybe the exec parameter to issue an... (5 Replies)
1. The problem statement, all variables and given/known data:
I want to read in a file, and plot the data in matlab. However, I do not like hardwiring filenames into my codes, so I always give the user the option to specify what the filename is. I am pretty inexperienced with matlab, so I have no... (0 Replies)
Hi Guys,
I have the following input.
test_junk_file__20120210092009.txt
latest_file__20120210092009.txt
side_load_junk_file__20120210092009.txt
I need to exclude the timestamp part from the file.
so, the output should be as follows.
test_junk_file.txt
latest_file.txt... (7 Replies)
Can this be done and if yes how?
I have 10 directories that end with the name 'cuff'
eg dir1-cuff , dir2-cuff
All these directories have a file named xyz.gtf
How do I run the same code for each directory and print an output inside the directory
something like
for dir in *cuff... (3 Replies)
Discussion started by: newbie83
3 Replies
LEARN ABOUT HPUX
chroot
chroot(1M)chroot(1M)NAME
chroot - change root directory for a command
SYNOPSIS
newroot command
DESCRIPTION
The command executes command relative to the newroot. The meaning of any initial slashes in path names is changed for command and any of
its children to newroot. Furthermore, the initial working directory is newroot.
Note that command suffixes that affect input or output for the command use the original root, not the new root. For example, the command:
locates file relative to the original root, not the new one.
The command variable includes both the command name and any arguments.
The new root path name is always relative to the current root. Even if a is currently in effect, the newroot argument is relative to the
current root of the running process.
This command is restricted to users with appropriate privileges.
EXTERNAL INFLUENCES
International Code Set Support
Single- and multibyte character code sets are supported.
WARNINGS
command cannot be in a shell script.
Exercise extreme caution when referring to special files in the new root file system.
does not search the environment variable for the location of command, so the absolute path name of command must be given.
When using to establish a new environment, all absolute path name references to the file system are lost, rendering shared libraries inac-
cessible. If continued access to shared libraries is needed for correct operation, the shared libraries and the dynamic loader be copied
into the new root environment.
SEE ALSO chdir(2), chroot(2).
STANDARDS CONFORMANCE chroot(1M)