Linked Questions

-1
votes
3answers
1k views

printf white space character in bash script

How can the white space character be escaped in printf for the purpose of this script that currently runs in a Cygwin client? The line containing the whitespace (which by itself works from the command ...
-1
votes
1answer
1k views

How to move file from one folder to another in shell script by changing the permission

I want to move a file from one folder to another folder. When the file's format is with space in between (file _name.dat) and when I am using the command mv file _name.dat /tmp then the file is not ...
1
vote
1answer
973 views

Concatenate multiple strings with spaces in them?

I am trying to do the following in ksh shell: JMX_ROOT=/bfs-build/build-info/mep_mainline-Linux.latest/core/mainline/automation SMOKE_JMX_LOCATION="$JMX_ROOT/\"Smoke Set\"/*.txt $JMX_ROOT/\"Smoke ...
1
vote
1answer
747 views

Outputting last modification date to another file?

I'm trying to read the number of lines in a file, and the last modification date of that file (e.g. if it was last modified Jan 18, 2013, it should output 2013-01-18), then append the data to the ...
3
votes
2answers
223 views

open a file using CDPATH and symlink

To quickly move around, I added a path to CDPATH that contains symlinks to different locations. I did this by adding the following line to .bashrc: export CDPATH=~/symlinks When working with ...
1
vote
1answer
330 views

Shell variables not working?

I'm trying to store the date in a variable ($DATE) so I can use it later, but it doesn't seem to work. See anything wrong? DATE=$(date +"%Y-%m-%d %R") sudo mysqldump -u root -pnotgivingyoumypassword ...
1
vote
1answer
367 views

What is the difference between $var and “$var”? [duplicate]

Possible Duplicate: $VAR vs ${VAR} and to quote or not to quote I assigned a variable var a value as follows: pradeep@pradeep-laptop:~$ var="Pradeep > is > a good > boy" ...
4
votes
2answers
171 views

Shell Script to isolate files scattered in different folders

I need to write a shell script that traverses a given directory structure in multiple levels, recognizes the video files scattered in the folders and copies all of them to another single folder. The ...
3
votes
2answers
160 views

Bind locally installed library

I have no root-acces on a machine and i'm trying to install a library called GiNaC locally in my home folder. I use this tutorial http://www.ginac.de/tutorial/Configuration.html#Configuration. At the ...
2
votes
2answers
94 views

What is PATH on a Mac OS?

What is the PATH in a Mac OS? I have used it to install global command-line tools, but the only documentation I have found are tutorials for doing just that, with no real explanation of what is ...
1
vote
1answer
96 views

Read a variable with “read” and preserve backslashes entered by the user

I'm using read to read a path from a user like so: read -p "Input the file name: " FilePath The user now enters this string: \Supernova\projects\ui\nebula What can I do to replace \ with /. The ...
1
vote
2answers
153 views

viewing variable values in a KSH script

I am using a KSH script that creates numerous variables from fairly complex code. What command can I place in the script to view the value of these variables as they are created? Would ECHO be the ...

15 30 50 per page