Hi Folks!
Can you help me with this find -printf command. I seem to be unable to execute the printf-command from my shell script. I'm confused: :confused:
My shell script snippet looks like this:
#!/bin/sh
..
COMMAND="find ./* -printf '%p %m %s %u %g \n'"
echo "Command: ${COMMAND}"... (1 Reply)
Hi all,
My simple AWK code does C = A - B
If C can be a negative number, how awk printf formating handles it using string format specifier.
Thanks in advance
Kanu
:confused: (9 Replies)
I am trying to use printf with a character string that is used within a do loop. The problem is that while in the loop, the printf prints the variable name instead of the value. The do loop calls the variable name from a text file (called device.txt):
while read device
do
cat $device.clean... (2 Replies)
Hi I'm having a problem with converting a file:
ID X
1 7
1 8
1 3
2 5
2 7
2 2
To something like this:
ID X1 X2 X3
1 7 8 3
2 5 7 2
I've tried the following loop:
for i in `cat tst.csv| awk -F "," '{print $1}'| uniq`;do grep -h $i... (4 Replies)
hi all
can any one help me to understand this
bdf -t vfxs | awk '/\//{printf("%-30s%-10s%-10s%-10s%-5s%-10s\n",$1,$2,$3,$4,$5,$6)}'
i want to understand the numbers %-30S% (4 Replies)
Hi Friends,
I am trying to insert lines of the below format in a file:
# x3a4914 Joe 2010/04/07
# seh Lane 2010/04/07
# IN01379 Larry 2010/04/07
I am formatting the strings as follows using awk printf:
awk 'printf "# %s %9s %18s\n", $2,$3,$4}'
... (2 Replies)
I want to print a string say "str1 str2 str3 str4" using printf.
If I try printing it using printf it is printing as follows.
output
-------
str1
str2
str3
str4
btw I'm working in AIX.
This is my first post in this forum :)
regards,
rakesh (4 Replies)
Hi Experts,
Quick question:
I am trying to get the output with decimal and floating point but not working:
echo "20.03" | awk '{printf "%03d.2f\n" , $0 }'
020.2f
How to get the output as :
020.03
Thank you. (4 Replies)
Hi All
I am working to process txt file into csv commo separated.
Input.txt
1,2,asdf,34sdsd,120,haahha2
2,2,wewedf,45sdsd,130,haahha
.....
....
Errorcode.txt
120
130
140
myawk.awk code:
{
BEGIN{
HEADER="f1,f2,f3,f4,f5,f6" (4 Replies)
Hello,
I am looking for a method to use in my bash script which allows me to use long strings with all special characters.
I have found that printf method could be helpful for me but unfortunately, when I trying
root@machine:~# tevar=`printf "%s%c"... (2 Replies)
Discussion started by: elxa1
2 Replies
LEARN ABOUT DEBIAN
rstart
RSTART(1) General Commands Manual RSTART(1)NAME
rstart - a sample implementation of a Remote Start client
SYNOPSIS
rstart [-c context] [-g] [-l username] [-v] hostname command args ...
DESCRIPTION
Rstart is a simple implementation of a Remote Start client as defined in "A Flexible Remote Execution Protocol Based on rsh". It uses rsh
as its underlying remote execution mechanism.
OPTIONS -c context
This option specifies the context in which the command is to be run. A context specifies a general environment the program is to
be run in. The details of this environment are host-specific; the intent is that the client need not know how the environment must
be configured. If omitted, the context defaults to X. This should be suitable for running X programs from the host's "usual" X
installation.
-g Interprets command as a generic command, as discussed in the protocol document. This is intended to allow common applications to
be invoked without knowing what they are called on the remote system. Currently, the only generic commands defined are Terminal,
LoadMonitor, ListContexts, and ListGenericCommands.
-l username
This option is passed to the underlying rsh; it requests that the command be run as the specified user.
-v This option requests that rstart be verbose in its operation. Without this option, rstart discards output from the remote's rstart
helper, and directs the rstart helper to detach the program from the rsh connection used to start it. With this option, responses
from the helper are displayed and the resulting program is not detached from the connection.
NOTES
This is a trivial implementation. Far more sophisticated implementations are possible and should be developed.
Error handling is nonexistent. Without -v, error reports from the remote are discarded silently. With -v, error reports are displayed.
The $DISPLAY environment variable is passed. If it starts with a colon, the local hostname is prepended. The local domain name should be
appended to unqualified host names, but isn't.
The $SESSION_MANAGER environment variable should be passed, but isn't.
X11 authority information is passed for the current display.
ICE authority information should be passed, but isn't. It isn't completely clear how rstart should select what ICE authority information
to pass.
Even without -v, the sample rstart helper will leave a shell waiting for the program to complete. This causes no real harm and consumes
relatively few resources, but if it is undesirable it can be avoided by explicitly specifying the "exec" command to the shell, eg
rstart somehost exec xterm
This is obviously dependent on the command interpreter being used on the remote system; the example given will work for the Bourne and C
shells.
SEE ALSO rstartd(1), rsh(1), A Flexible Remote Execution Protocol Based on rsh
AUTHOR
Jordan Brown, Quarterdeck Office Systems
X Version 11 rstart 1.0.4 RSTART(1)