Greetings.
This is a question about the ksh environment.
Let's say that I want to evaluate a path name provided to my script as shown here: ./test.ksh /tmp/user-data/stuff
This prior example is straight forward as there isn't anything that needs to be interpreted. The script variable shows...
I need to create a tar file in a filesystem with limited room. Is there a way to send the tar file directly to the compress command so that the tar output is directly compressed (i.e., no intermediate file) and therefore smaller?
Thank you.
Gawker [pc2]
In a file, I have strings such as:
abc_1234_xyx
abc_34kk_xyx
abc_q3_xyx
I am trying to find a wild card pattern I can use so that a single grep can find strings with abc at the start and xyx at the end. The string length may vary.
I was hoping there was something like grep "abc*xyz"...
I hope that this is the correct forum for this...
I'm writting a script that will list user data files in a directory. The script will allow the user to select the file using an associated number that is displayed next to the file name.
I want to control how many files (lines) are displayed...
I've a directory structure similar to this:
/backup/test/servera/...
/backup/test/serverb/...
/backup/test/serverc/...
/backup/test/serverd/...
/backup/test/servere/...
Using a single find command, is it possible to list just those files residing in /backup/test/serverb and...
I've a IBM laptop that I use at work to connect via PCXware telnet sessions to various servers. When my PC is unattended for a time (for example lunchtime), my telnet sessions are no longer viable. The windows are still open, but when I try to do anything in one of the windows, the window is...
I've an awk process that does a number of system queries to build up a line of data and write out to a file. The format of the awk process is:
awk ' { ... } ' >> work-file
Since it takes a long time to gather the data, I'd like to use a process indicator to show that work is progressing so...
Last week, somebody was kind enough to post a snippet of PERL code on how to take a date/time value and subtract from it to get a date/time of (example) 10 minutes ago.
My post on this question was deleted before I got to copy the response. [sad]
Would that kind soul please repost his/her...
Hi,
If an array has been created in an awk process via the split command, is there a variable that reports on the number of array entries?
I can get the information by reading the array with "while", but figure there must be a more direct way of getting the value.
Thanks!
[pacman]...
Hi,
In a awk process, I am reading data from a file where some of the data lines contain text bracketed by parenthesis like the following example:
...SysKonnect PCI FDDI Adapter (48110040)
I set up a variable:
Adapter_Desc = substr($0,30,length($0))
And then try to echo the data via a...
Hi,
I want to read a file that contains email addresses and create a single string variable that contains all of the address, each address with a trialing space. The data in email_aix_users.lst looks like:
user1@my.com
user2@my.com
...
And the code looks like:
MAIL_LIST=`awk ' { print $0 } '...
Greetings All.
Using a shell script and awk, I am trying to do a locate/compare certain information contained in the /etc/printcap file on a LINUX system.
The file is specially formated, so I cannot search for " :" (colon with leading blank) as what appears to be leading blanks on...
Hi,
I've a ksh script that contains two user functions that perform an awk process.
example:
function user1_function
{
awk ' { misc. code } '
}
function user2_function
{
awk ' { print $0; user1_function } '
}
user1_function is defined before user2 function. The call to...
Hi Gents,
I'm working with awk in a LINUX 7.2 environment.
In an awk execution, I get a printer id and print job number. I want to get the "rank" information on the job from the execution of an lpq statement.
(The lpq data looks like: 1st root 4 .bash_profile 240 bytes)
I've...
Hi,
I am working on a script, part of which does a string replacement. The user needs the ability to:
01) Enter a string that optionally contains embedded spaces.
02) Enter a string that optionally contains a double quote.
The following works just fine for (01):
Example: Change occurances...
Hi,
I have an AWK process in a shell script. Part of the function is to determine the position of a character string on a line. For example:
awk ' {
BytePos = match($0,"a")
print BytePos
} ' string.dat
I want to access the value of the BytePos variable by...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.