The call will look at the tag k1v2, add the numbers together, in this case 2+1=3
This means that the function will look at the first 3 user arguments only (VAL1 VAL2 DESC).
The s4 tag is a shift tag, so that when I print VAL1 VAL2 DESC, everything is shifted by 4 characters
to the right.
Thus
The thing I am trying to do is that if the user puts the p-tag, the description which is the
last user argument defined ($3), is printed at the position defined by the corresponding number.
For example, p15 will place DESC starting from the 15 character position.
I am lost -- it is not all described, and yet other stuff is in there. What is the question? How to pad a field to a specific length? Can we assume it fits? Right or left? Just add one space at a time until the lenght is right?
I would like to get an opinion for my solution for this task and get feedback about better approach or mistakes I have made.
1. The problem statement, all variables and given/known data:
The task is to create a script which prints information about users whose names are specified in the... (2 Replies)
hello i have search in an old .bash_history and i find this instruction :
xhost `xhost | awk -F: 'NR > 1 {printf ("-%s ", $NF)}'`
someone give me some informations about this instruction?:confused:
thx (2 Replies)
Some of my admin made some changes on my Solaris-10 box and after that I started getting this wiered issue. I checked path, but not able to figure it out. This is for a non-root user
gcadmin@brbpod06: $ echo $SHELL
/usr/bin/bash
gcadmin@brbpod06: $ bash
bash: brbpod06:: command not found... (2 Replies)
My intention is to log the output to a file as well as it should be displayed on the console > I have used tee ( tee -a ${filename} ) command for this purpose. This is working as expected for first few outputs, after some event loggin nothing is gettting logged in to the file but It is displaying... (3 Replies)
Hello,
I start an adapter using the following command -
nohup ./start_embargoAdapter >/dev/null 2>&1 &
and when I do the following, I can see:
/export/home/xxxxx> ps -ef | grep embargo
xxxxx 28086 20761 0 23:23:29 pts/7 0:00 grep embargo
xxxxx 8866 1 0 Oct 06 ? 0:00... (2 Replies)
Hello, i have a problem with the output from my bash program.
I made this program
#!/bin/bash
BESTANDEN=$* # Plaatst bestanden in de variabele BESTANDEN
TMPFILE=xmlprog.sh.$$.$RANDOM # basisnaam voor tijdelijke bestanden
# controller of het programma correct is aangeroepen
if
then
... (6 Replies)
Hi all,
How to:
Run a bash script, display on the screen and save all information in a file including error information.
For example:
I have a bash script called test.sh
now I want to run the test.sh and display the output on the screen and save the output including error info to a file.
... (1 Reply)
I have a start|stop|restart script for a custom app we have. After it tries to stop our process the correct way, it checks to see if it's gone, if not it tries to kill it, if that doesn't work kill -9.
If I run kill -9 on the PID from the command line it kills it and all is well. If I have the... (1 Reply)
I'm on a Linux machine and need a program that will display user information as follows: user name, user directory and current date & time.
I think we can compile C, C++ and Perl.
All help is appreciated. (4 Replies)
Small query-
I want to do some operation on all the files older then today. Before I do that operation, i want to verify if the command works properly or not.
Surprisingly, the command below returns me file, which are created today -
find /mrk_archive/PG/ftp/incomming/gbs/2008 -type f... (2 Replies)