10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to write a BASH script that will prompt a user to enter a number of days, then calculate the date.
My problem is the date command uses single or double quotes. For Example..
date -d "7 days"
Here is an example of some same code I am trying to work through.
echo "when do you... (4 Replies)
Discussion started by: javajockey
2. Shell Programming and Scripting
I am at a loss on this one. I am trying to run this command on a bunch of (OS 10.7.4) macs:osascript -e "tell application \"System Events\" to return name of every process whose frontmost is true"
On some, it works fine. On others, I get this error:
I have also tried (note the single quotes):... (3 Replies)
Discussion started by: nextyoyoma
3. Shell Programming and Scripting
I have got a file comp_data containing the below data :
This file can have many rows like shown above. I want the values separated by "," in second column(taking "|" as delimiter) to be in quotes. These... (2 Replies)
Discussion started by: msabhi
4. Shell Programming and Scripting
I have this data how do i add ' ' to them like '-AAL00L' , '-BBE4577' , 'ABC'
ABC (5 Replies)
Discussion started by: dinjo_jo
5. Shell Programming and Scripting
(no, i can't switch shells, although i'd love to. yes, i have read http://www.grymoire.com/Unix/CshTop10.txt.)
i finally managed to get an alias working the way i want it to, but i don't understand how one part of it works (highlighted in red):
alias log ' \\
set x=`echo \!:1 | /bin/sed... (1 Reply)
Discussion started by: acheong87
6. Shell Programming and Scripting
hi guys, i have a question related to quoting but i am not sure how to formulate it...
lets say we want to simulate the following shell actions
ctags /home/work/folder1/*.sh /home/work/folder2/*.sh /home/work/folder3/*.sh
so i make the following script
... (2 Replies)
Discussion started by: aegis
7. Shell Programming and Scripting
The block below isn't a surprise:$ ls
file1 file2 file3
$ echo $x
file1 file2 file3
$ echo '$x'
$ echo "$x"
$But I found this block a bit bewildering:$ echo $x'
$I'm wondering why substitution wasn't performed on the $x, since it was unquoted (as far as I can tell).... (5 Replies)
Discussion started by: na5m
8. Shell Programming and Scripting
can somebody help, what quote i should use in below statement or what wrong of it ?
the 1st (*) is a char, the 2nd and 3rd (*) is a wildcard
if ] && ] && ]
thanks in advance. (2 Replies)
Discussion started by: 3Gmobile
9. Shell Programming and Scripting
Can someone explain the following? I can use find on *.pm without quotes, but find on *.pl makes on error, I need quotes for the second version. What's up with that?
$find -name *.pm
$find -name *.pl
find: paths must precede expression
$find... (2 Replies)
Discussion started by: tphyahoo
10. Shell Programming and Scripting
I have trouble with quotations of the M4 preprocessor.
I want to write a basic makro that removes all spaces and newlines at the end and at the beginning of a string.
I tried this:
define(`TRIM_END', `patsubst(`$1', `\(\\n\| \)*$', `')')
define(`TRIM', `patsubst(`TRIM_END(`$1')',... (0 Replies)
Discussion started by: hindman