10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm having an issue with bash read input when using a case statement.
The script halts and doesn't read the input on the first loop. if I hit enter then the scripts starts to respond as expected. Need some help here.
defaultans=8hrs
read -e -i $defaultans -p "${bldwht}How long would you like... (5 Replies)
Discussion started by: woodson2
5 Replies
2. Shell Programming and Scripting
Hi,
I am working on a script, which requests users to enter input.
Ex: read -p "Please enter your email id:" email
I don't want users skipping this entry, this has to be mandatory.I dont want to proceed without input.
I can do a check if variable $email is empty and proceed if not.But, i... (7 Replies)
Discussion started by: aravindadla
7 Replies
3. Shell Programming and Scripting
Hi All,
Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created.
/Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt
/Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies
4. Shell Programming and Scripting
Hi.
How can I create a history function? (By "read" command or so)
&
How can I configure a read command so that the arrow keys are not displayed so funny? (^[[A)
Thanks in advance. (4 Replies)
Discussion started by: sinnlosername
4 Replies
5. Shell Programming and Scripting
Dear Friends,
I am looking for a shell script to merge input files into one file .. here is my idea:
1st paramter would be outfile file (all input files content)
read all input files and merge them to input param 1
ex: if I pass 6 file names to the script then 1st file name as output file... (4 Replies)
Discussion started by: hyd1234
4 Replies
6. Shell Programming and Scripting
Hello.
I am running 2 scripts : script_1 and script_2
These scripts are run as root
Script 2 contains :
#!/bin/bash
#
# ~/bin/script_2
#
E_BAD_PARAM=115
#
date2stamp () {
date --date "$1" +%Y-%m-%d___%H:%M:%S
}
#
USER_NAME=$1
NB_PARAM=$#
PARAM0=$0 (2 Replies)
Discussion started by: jcdole
2 Replies
7. Shell Programming and Scripting
Below is a simple script to prompt for user input while suggesting an editable default value at the prompt:
shortname=user1
read -e -i $shortname -p "Please enter the username you would like to add: " input
USERNAME="${input:-$shortname}"
Please enter the username you would like to add:... (3 Replies)
Discussion started by: woodson2
3 Replies
8. Shell Programming and Scripting
Hello,
I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall:
I regularly need to delete files from many directories.
A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies
9. Shell Programming and Scripting
Hi
I am new to writing script and want to use a Bash Piped while-read and read from user input.
if something happens on server.log then do while loop or if something happend on user input then do while loop.
Pseudocode something like:
tail -n 3 -f server.log | while read serverline || read... (8 Replies)
Discussion started by: MyMorris
8 Replies
10. UNIX for Advanced & Expert Users
HI ,
I am trying to wite a script that will prompt me saying " what is path that you want to find ?". once i specify the path, the script should put this path in the find command mentioned below and execute the script:
find <path> -ctime +200 -type f -exec ls -l {} \;
for example :
... (7 Replies)
Discussion started by: bsandeep_80
7 Replies
HCOPY(1) General Commands Manual HCOPY(1)
NAME
hcopy - copy files from or to an HFS volume
SYNOPSIS
hcopy [-m|-b|-t|-r|-a] source-path [...] target-path
DESCRIPTION
hcopy transfers files from an HFS volume to UNIX or vice versa. The named source files are copied to the named destination target, which
must be a directory if multiple files are to be copied.
Copies are performed using a translation mode, which must be one of:
-m MacBinary II: A popular format for binary file transfer. Both forks of the Macintosh file are preserved. This is the recommended
mode for transferring arbitrary Macintosh files.
-b BinHex: An alternative format for ASCII file transfer. Both forks of the Macintosh file are preserved.
-t Text: Performs end-of-line translation. Only the data fork of the Macintosh file is copied.
-r Raw Data: Performs no translation. Only the data fork of the Macintosh file is copied.
-a Automatic: A mode will be chosen automatically for each file based on a set of predefined heuristics.
If no mode is specified, -a is assumed.
If a UNIX source pathname is specified as a single dash (-), hcopy will copy from standard input to the HFS destination. Likewise, a single
dash used as a UNIX destination pathname will cause hcopy to copy the HFS source to standard output.
NOTES
Copied files may have their filenames altered during translation. For example, an appropriate file extension may be added or removed, and
certain other characters may also be transliterated.
The destination target must not be ambiguous; that is, it must be obvious whether the target is on the UNIX filesystem or on an HFS volume.
As a rule, HFS targets must contain at least one colon (:), usually as the beginning of a relative pathname or by itself to represent the
current working directory. To make a UNIX target unambiguous, either use an absolute pathname or precede a relative pathname with a dot and
slash (./).
SEE ALSO
hfsutils(1), hls(1), hattrib(1)
AUTHOR
Robert Leslie <rob@mars.org>
HFSUTILS
13-Jan-1997 HCOPY(1)