10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello, everyone. I'm currently trying to write a command system for a Minecraft server using screen.
Here are the scripts I'm currently using.
0.sh
#!/bin/bash
screen -S Test114 -dm java -Xmx4G -jar server.jar nogui
1.sh
#!/bin/bash
args="$@"
args2="${args@Q}"
#args3=`printf '%q\n'... (2 Replies)
Discussion started by: Develon
2 Replies
2. Shell Programming and Scripting
Is possible to print padded string in printf?
Example
echo 1 | awk '{printf("%03d\n", $1)}'
001I want
S1
S11
S2
S21to be padded as:
S01
S11
S02
S21Thanks! (26 Replies)
Discussion started by: yifangt
26 Replies
3. Shell Programming and Scripting
Hi,
i have a script, which is incomplete, am on my way developing it.
Input
1,12,2012,IF_TB001
2,12,2012,3K3
3,Z56,00000,25,229,K900,00, ,3G3, ,USD, ,0000000000,000, , , , 550000000
3,Z56,00000,53,411,W225,00,000, , ,USD,OM170,0000000000,000, , , , -550000000
4,Z56,COUNT, 4,SUM LOC,... (19 Replies)
Discussion started by: selvankj
19 Replies
4. Shell Programming and Scripting
set -A allfiles `find $usrhtml -type f`
i am trying to populate this array with the find command. It works fine when find is looking through a single directory but when i add a new subdirectory the files in the subdirectory get duplicated. Can anyone help me and fix this so each files in... (1 Reply)
Discussion started by: bjhum33
1 Replies
5. Shell Programming and Scripting
I have a file which contains a list of paths separated by a new line character.
e.g
/some/path/to/a/file.png
/some/path to/another/file.jpeg
/some path/to yet/another/file
Notice that these paths may contain metacharacters, the spaces for example are also not escaped.
If I wanted... (5 Replies)
Discussion started by: cue
5 Replies
6. Shell Programming and Scripting
Hi,
I want find multiple string in one file using find coomand.
And keeping it in one variable.grep is not working. (5 Replies)
Discussion started by: vivek1489
5 Replies
7. Shell Programming and Scripting
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)
Discussion started by: flotsam
4 Replies
8. UNIX for Advanced & Expert Users
#include <stdio.h>
#include <math.h>
// this function calculates the volume of a Cylinder
int main(void)
{
int r; // radius
int h; // height
double M_PI; // pi
int pOne = pow (r, 2);
// get user input of radius and height
printf ("Enter your... (3 Replies)
Discussion started by: pwanda
3 Replies
9. UNIX for Dummies Questions & Answers
Folks,
I have been searching a dir for specfic files that have been accessed within a certain timeframe. The issue that I am having is that it picks up the .snapshot dir as well.
I am using the following:
find /probecards/ -name "S25E3N*" -mtime -1 -type f
Is this correct or how do I... (4 Replies)
Discussion started by: lodey
4 Replies
10. UNIX for Dummies Questions & Answers
using ksh on HP 11.11.
I'm new to HP, so maybe it's something I need to turn on in HP, but I figured it's probably in ksh.
If I run "grep aaa" (or any command) Whenever I try to Ctrl-C it does not work. I'm not saying it did work before, as I'm new to the environment.
Do I need to set a... (3 Replies)
Discussion started by: dangral
3 Replies