10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello, this is my first post here.
I'm attempting to write a bash shell script to rm the contents of a directory without deleting the directory, specifically in OS X 10.10 . Here's what I have:
function clear() {
USER="$USER"
DIR=$1
rm -rfv /Users/"$USER"/library/$DIR/*
}
clear... (6 Replies)
Discussion started by: YouNicks
6 Replies
2. Shell Programming and Scripting
Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom.
I create a named pipe then:
dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024
but when I cat a file to the fifo that's 1024 random bytes:
cat randomfile.txt >... (7 Replies)
Discussion started by: Devyn
7 Replies
3. Shell Programming and Scripting
I have this in my .bashrc and use it to play my music. It is organized by directories and this will play them in random order:
play(){ ## play directories with mplayer (random)
if
then
# if no option show music types
echo -n "
play {directory|style}
Styles:
-------"
find... (0 Replies)
Discussion started by: bdragon
0 Replies
4. Ubuntu
Hi
I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue:
I want expect script for random passwords and random commands generation.
please can anyone help me?
Many Thanks in advance (0 Replies)
Discussion started by: vanid
0 Replies
5. Shell Programming and Scripting
Hey guys,
I'm new to the programming world in general, and I only write in applescript so far. I am trying to find a shell script that will return a list of all the sub directories (or folders) within a directory on my ftp server. The server needs a username and password. I would assume the... (4 Replies)
Discussion started by: thriftinkid
4 Replies
6. UNIX for Dummies Questions & Answers
Hello-
I need to copy a file into multiple directories, and each directory's sub-directories (of which there are 5)
Currently, the parent directory is set up like this:
dir1
sub-dir1
sub-dir2
sub-dir3
sub-dir4
sub-dir5
dir2
sub-dir1
sub-dir2
sub-dir3
... (1 Reply)
Discussion started by: penlok
1 Replies
7. Shell Programming and Scripting
Hello,
say suppose i am processing an file emp.dat the field of which are
deptno empno empname etc
now say suppose i want to change the file to emp.lst then how can i do it? Here i what i attempted but in vain
BEGIN{
system("sort emp.dat > emp.lst")
FILENAME="emp.lst"
}
{
print... (2 Replies)
Discussion started by: salman4u
2 Replies
8. UNIX for Dummies Questions & Answers
What Im basically trying to do is this:
I have a small script that can grep any parameter entered into a search string, then print to the screen the name of each file the parameter appears in as well as the file path, ie the directory.
The code Im using just for this is....
Directory... (3 Replies)
Discussion started by: Eddeh
3 Replies
9. UNIX for Dummies Questions & Answers
howdy all --
I recently trashed my old PC and bought a MacBook. Moving all my files over, I find I've got a zillion instances of stupid Windows files like Thumbs.db and desktop.ini all over the place. I'm looking for a way to delete them all at once (deleting each manually would take forever),... (2 Replies)
Discussion started by: mdtreky
2 Replies
10. UNIX for Dummies Questions & Answers
Appreciate your thoughts....I m very new to this. Anyone here have the similar experience and work around. Thanks.
Use scp to send a file from HP-UX to SUN box successfully but return code randomly being generated. The majority of time reports 1 (meaning not ok) and sometime 0 (OK).
When scp... (0 Replies)
Discussion started by: huiraym
0 Replies