Search Results

Showing results 1 to 11 of 11
Search took 0.01 seconds.
Search: Posts Made By: Aia ; Forum: Shell Scripting and child forums
Forum: Shell Scripting 14 Days Ago
Replies: 14
Views: 671
Posted By Aia
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
Posted By Aia
Look into the command touch
Forum: Shell Scripting 15 Days Ago
Replies: 11
Views: 784
Posted By Aia
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
Posted By Aia
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
Posted By Aia
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
Posted By Aia
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
Posted By Aia
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
Solved: turn mb to gb!
Views: 1,601
Posted By Aia
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
Posted By Aia
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
Posted By Aia
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
Posted By Aia
About File Type Association (http://puppylinux.org/wiki/how-tos/general/filetypeassociation) in Linux

A more serious conversation...
Showing results 1 to 11 of 11

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC