Forum: Shell Scripting 14 Days Ago |
| Replies: 14 Views: 671 As you have been shown you can pipe the ls command to another program that further parses the output, in this case awk.
awk can do a lot of things, but even in its simplest form it can be very... |
Forum: Shell Scripting 14 Days Ago |
| Replies: 14 Views: 671 Look into the command touch |
Forum: Shell Scripting 15 Days Ago |
| Replies: 11 Views: 784 if ( ${cnt} -ge "1" ) That reads if cnt is greater or equal to 1 therefore != would have not worked.
if ($cnt >= 1) then
# whatever you want to mail
endif |
Forum: Shell Scripting 15 Days Ago |
| Replies: 11 Views: 784 csh doesn't use if/fi but rather if/endif. Look at posted script and you'll see you have an if/fi.
BTW csh doesn't have the same conditional operators than bash so -ge doesn't work. |
Forum: Shell Scripting 19 Days Ago |
| Replies: 4 Views: 396 Find any difference between both and then match it. e.g. with HOOK by itself in a line we can match the beginning and end of the line. Thus:
grep '^HOOK$' file_name
Once you have down the... |
Forum: Shell Scripting 19 Days Ago |
| Replies: 5 Views: 500 It makes a difference the quotation scheme.
sed "/$npname.*in/d" parts.txt > parts.tmp |
Forum: Shell Scripting 20 Days Ago |
| Replies: 3 Views: 407 What's the trouble?
In its simplest form, create another executable script with three lines of text, where each line is the absolute path to those three scripts. |
Forum: Shell Scripting Mar 19th, 2009 |
| Replies: 11 Views: 1,601 Assuming data format:
For example purposes coming from datafile to awk and displaying to standard output. Modify to need.
awk '/s/ {
if ( index($2, "GB") ) {
$2 =... |
Forum: Shell Scripting Jan 24th, 2009 |
| Replies: 9 Views: 1,204 result=$(echo $var1 $var2 | awk '{print $1 - $2}')
$1 inside awk becomes whatever variable you past first, and $2 becomes the second variable and so on.
More about awk... |
Forum: Shell Scripting Jan 16th, 2009 |
| Replies: 4 Views: 1,028 echo $1 | sed -e "s/^[^=]*=\(.*\)$/\1/"
echo $1 is the argument from the shell piped to sed but it doesn't have any thing to do with \1
What's \1? The first group remembered from the original... |
Forum: Shell Scripting Dec 26th, 2008 |
| Replies: 3 Views: 713 About File Type Association (http://puppylinux.org/wiki/how-tos/general/filetypeassociation) in Linux
A more serious conversation... |