10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
If i do below command in unix prompt which static values (ie 27..97), it is working fine and gives desired output
>ls -d $WORKDIR/batch/somefilename_{27..97}.* 2>/dev/null
somefilename_27.sometxt
somefilename_28.sometxt
somefilename_29.sometxt
..
somefilename_97.sometxt
But if i want... (2 Replies)
Discussion started by: haiderali
2 Replies
2. Shell Programming and Scripting
Trying to do so
echo "111:222:333" |awk -F: '{system("export TESTO=" $2)}'But it doesn't work (2 Replies)
Discussion started by: urello
2 Replies
3. Shell Programming and Scripting
Example:
while read line
do
stat -c %G $line
done < somefile.txtThe problem is that inside somefile.txt lines can have any symbol allowed as file name, like (). Even with spaces, it splits the words.
somefile.txt:dira/my first jump.avi
dirb/surf video (1080p).mkv (2 Replies)
Discussion started by: Tribe
2 Replies
4. Shell Programming and Scripting
Hi All,
i have a requirement where i have to run a script with at least 25 arguements and position of arguements can also change. the unapropriate way is like below. can we achieve this in more good and precise way??
#!/bin/ksh
##script is sample.ksh
age=$1
gender=$2
class=$3
.
.
.... (3 Replies)
Discussion started by: Lakshman_Gupta
3 Replies
5. Shell Programming and Scripting
Dear all,
I have two files like this
file1
A B
C D
E F
file2
1,2
3,4
5,6
I want this output
output_expected
A B 1,2
C D 3,4
E F 5,6 (3 Replies)
Discussion started by: valente
3 Replies
6. Shell Programming and Scripting
Dear all, today I'm scratching my head with a simple (I believe) issue.
Working with date is quite simple, so if I Need to add some seconds to current time, I'll use:
date --date='+30 seconds' +"%Y-%m-%d %H:%M:%S"But, how to pass the value to add from a variable? I tried the following without... (2 Replies)
Discussion started by: Lord Spectre
2 Replies
7. Shell Programming and Scripting
sdcprd@dotstoas110:$ echo $F2
1327332411
this works
----------
sdcprd@dotstoas110:$ perl -MPOSIX -le 'print strftime ("%m%d%y",localtime (1327332411))'
012312 <<<< correct date
this doesnt
-----------
sdcprd@dotstoas110:$ perl -MPOSIX -le 'print strftime ("%m%d%y",localtime... (10 Replies)
Discussion started by: aliyesami
10 Replies
8. Programming
Hello everybody,
I am having problem in converting byte array variables to Hexa String variables for Linux. I have done, converting byte array variables to Hexa String variables for Windows but same function doesn't work for linux. Is there any difference in OS ? The code for Windows is given... (2 Replies)
Discussion started by: ritesh_163
2 Replies
9. UNIX for Dummies Questions & Answers
The following seems quite basic but does not seem to work. Anybody know why?
$ g=1
$ echo $g
1
$ echo abc$g
abc1
$ abc$g=hello
ksh: abc1=hello: not found
$ echo $abc1
ksh: abc1: parameter not set
It works when I specify the full variable name
$ abc1=hello
$ echo $abc1
hello
... (2 Replies)
Discussion started by: Chong Lee
2 Replies
10. AIX
Hi all,
I am trying to set up some variables in a shell script. The variables contain values of various paths needed to run a java module. The problem is the variables dont seem to be setting at all.
here is what i am trying to do :
JAR_HOME=/home/was5/bdcms/scheduledjobs/lib
export... (1 Reply)
Discussion started by: rpandey
1 Replies