Forum: Shell Scripting 27 Days Ago |
| Replies: 4 Views: 500 At least on Solaris "-u" is the option. For any other system you are going to have to man ls and actually read it to find out if any of the options have anything to do with access time and then... |
Forum: Shell Scripting 27 Days Ago |
| Replies: 4 Views: 500 |
Forum: Shell Scripting 34 Days Ago |
| Replies: 14 Views: 1,178 I didn't mention, that was on Solaris. On something else the "t" may not be necessary (and is seemingly not on your system), but that decimal point is (when including seconds).
There is a... |
Forum: Shell Scripting Nov 16th, 2009 |
| Replies: 14 Views: 1,178 The man page for ls and the awk command.
ls -E f1.sh | awk '{print $6, $7, $8}' |
Forum: Shell Scripting Nov 16th, 2009 |
| Replies: 14 Views: 1,178 touch -mt 200911141130.00 f1.sh
Take a closer look at the man page. |
Forum: Shell Scripting Nov 16th, 2009 |
| Replies: 14 Views: 1,178 Yes it will. Why don't you try showing us what you tried.
P.S. Did you try typing "man touch" first? |
Forum: Shell Scripting Nov 3rd, 2009 |
| Replies: 3 Views: 670 Configure the ssh to use private keys. |
Forum: Shell Scripting Jul 6th, 2009 |
| Replies: 5 Views: 696 See http://www.daniweb.com/forums/thread15164.html |
Forum: Shell Scripting Jul 6th, 2009 |
| Replies: 5 Views: 696 #! is a built-in exec. The shell script is executed in the shell declared on this line.
$1 etc are the arguments provided on the command line (or provided on the function call when used inside a... |
Forum: Shell Scripting May 27th, 2009 |
| Replies: 4 Views: 1,135 grep will only match the lines (and return the entire line, not just the matched portions of it), and will not alter them. If you wish to alter the lines you are going to need to use sed, or... |
Forum: Shell Scripting Sep 22nd, 2008 |
| Replies: 6 Views: 1,884 try it, post it, and we will help to correct it |
Forum: Shell Scripting Jul 18th, 2008 |
| Replies: 4 Views: 1,085 You can also do
tar xvf bin.tar \*perl\*
but you're right, the quotes are probably easier. |
Forum: Shell Scripting Jul 3rd, 2008 |
| Replies: 3 Views: 1,431 Of course you can (and it is -9), but it's not worth it if you don't know whether or not it was already used. use split and mail it in pieces, then use join to recreate the file at the other end. |
Forum: Shell Scripting Jul 3rd, 2008 |
| Replies: 3 Views: 1,431 Not that I think you'll win much, but did you use the -9 option when you created the gzip file?
Otherwise, split and join. |
Forum: Shell Scripting Jun 30th, 2008 |
| Replies: 6 Views: 3,548 Question 1. What if the same pattern also fits inside the "largest" pattern? i.e
pattern: A.*B
String: ABCDEFBGHIJK
Is AB matched, or is ABCDEFB matched?
Question 2:
What is th... |
Forum: Shell Scripting Nov 28th, 2007 |
| Replies: 9 Views: 1,716 Ok, unfortunately, the only thing left to do, that I can think of, is to do the script this way:
#!/bin/sh -f
for i in `grep "/\\*" file`; do
echo "$i"
done
And start the entire script... |
Forum: Shell Scripting Nov 28th, 2007 |
| Replies: 9 Views: 1,716 It is because of file name expansion in the shell.
Just for fun try it this way
for i in `grep "/\\*" file`; do
set -f i=$i
echo "$i"
done |
Forum: Shell Scripting Nov 27th, 2007 |
| Replies: 9 Views: 1,716 for i in `grep "/\\*" file.c`; do
You need to escape the escape character when doing this inside of the expression quotes.
Edit: Which, I believe, is what ithelp meant, but he mistakenly... |
Forum: Shell Scripting Nov 8th, 2007 |
| Replies: 4 Views: 1,617 I would have to assume that it is coming from the tee (and that error will only occur on the file handle being read, not the filehandle being written), so I have to assume that the find command is... |
Forum: Shell Scripting Nov 8th, 2007 |
| Replies: 4 Views: 1,617 then do
find / -wholename='somename' -print | tee -a filename
Edit:
Although I am not familiar with "wholename" argument, I assume your find options are actually something different (and... |
Forum: Shell Scripting Oct 26th, 2007 |
| Replies: 4 Views: 3,209 At the top of this forum is a fixed post to a tutorial. Read through some of that, try something out, if it doesn't work post your code and I'll help, but I'll not do it for you. |
Forum: Shell Scripting Oct 26th, 2007 |
| Replies: 4 Views: 3,209 are you using ksh or bash? if so
set -A aArray `print "$a" | sed -e 's/-/ /'`
set -A bArray `print "$b" | sed -e 's/-/ /'`
# now ${aArray[0]} and ${bArray[0]} contain the year
# and... |
Forum: Shell Scripting Aug 21st, 2007 |
| Replies: 3 Views: 1,529 Check which quote you are using. On the keyboard it should be the one that slants from the upper left to the lower right, not the other way around and not straight up and down. In the code, it... |
Forum: Shell Scripting Jul 26th, 2007 |
| Replies: 3 Views: 1,916 Well this is guaranteed to get you answers.
Have you never heard of Google?
Or even the command "man ftp", since that, itself, describes the .netrc file and your "logfile" can be simple output... |
Forum: Shell Scripting May 14th, 2007 |
| Replies: 9 Views: 6,401 Uhhm, awk is a really large subject. O'Reilly publishing http://www.oreilly.com/ produces an entire book (and a good one at that) dedicated to sed and awk. Try that. |
Forum: Shell Scripting Mar 5th, 2007 |
| Replies: 3 Views: 2,175 |
Forum: Shell Scripting Jul 20th, 2006 |
| Replies: 7 Views: 10,158 I coould be completely wrong, because I always put it against the left edge anyway, but I believe the "END_SCRIPT" marker you are using to end the so-called here document, needs to be against the... |