for those calling things useless...... In my opinion using `cat` as an example is easy to understand, so useful. There are many one-liners (without useless things) which take hours to understand what is really happening. My scripts are easy to read, how 'bout yours??????
Using:
uses two processes,
causes the data in file to be read by cat, written by cat, and read again by grep, and
runs slower
than using:
both of which:
use only one process,
only reads the data in file once, and
run faster.
That is why we call the first form a useless (and inefficient) use of cat.
With a little more experience, you will find either of the latter forms of these command lines just as easy to read as the first form.
These 2 Users Gave Thanks to Don Cragun For This Post:
:confused: I need to find a place or places on the Internet where I can find UNIX scripts to view and to modify to make life easy on the UNIX environment. Can someone help me on this. Thanks (7 Replies)
Hi All,
I am new to Unix Scripting. I have below scenario. I need to write a Unix function with the following.
1. I have table. From this table I need to write a query.
SELECT Col1(File_nm),Col2(From_Loc),Col3(To_Loc)
FROM A
WHERE CONDITION
For... (1 Reply)
Hi Gurus,
I am a system admin in solaris field and ive planned to study unix scripting.ive planned to start reading Mastering Unix scripting by randal.Scripts in that are based on Korn shell(ksh).my question is whether the same scripts can be applied to other shells like bash etc..And... (1 Reply)
Hi Gurus,
I am a system admin in solaris field and ive planned to study unix scripting.ive planned to start reading Mastering Unix scripting by randal.Scripts in that are based on Korn shell(ksh).my question is whether the same scripts can be applied to other shells like bash etc..And... (4 Replies)
how to check if a unix script gets executed without errors across all unix platforms.
incase if a script gets executed without errors only one platform say AIX, what needs to be done to that script such that it will run all unix platforms like linux, hp, sun etc (2 Replies)
i need help with this problem this is the problem: Write a script that logs how many users login on/off the system over a 5 minute period. It can run in the foreground, and run 4 times a minute. Set a trap that will not allow a CNTRL-C command, and if a CNTRL-C is excuted store the time and date... (1 Reply)
Hello Experts,
I have the following questions to be discussed here at this esteemed discussion forum.
I have two Excel sheets which contain Unix Commands llike creating directory the structure/ftp/Copy/Zip etc to basically create an environment. I need help in understanding some of... (1 Reply)
LIST=/home/xxxxxxx/ABC/xeeno_scrpts/temp/tempfile
ERRORDIR=/home/xxxxxxx/ABC/error_directory
EMAILFILE=/home/xxxxxxx/ABC/xeeno_scrpts/temp/emailfile
echo "There were errors in the following report file for Xeenos:" > $EMAILFILE
echo >> $EMAILFILE
echo "This files have been moved to... (9 Replies)