10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
original post --
I have a korn shell script that does some things that depend on creating and writing a file in a directory. I'm looking for a more elegant/efficient way to do the check than what I'm using now:
if ]
then
print "Creating ${STGDIR}/${SHOW}"
mkdir... (3 Replies)
Discussion started by: Dalej
3 Replies
2. Shell Programming and Scripting
Hi,
I have file in my $datadir as below :-
SAT_1.txt
SAT_2.txt
BAT_UD.lst
BAT_DD1.lst
DUTT_1.txt
DUTT_la.txt
Expected result :-
should get all the above file in $<Filename>_file.lst
Below is my code :-
for i in SAT BAT DUTT
do
touch a.lst
cd $datadir (1 Reply)
Discussion started by: satishmallidi
1 Replies
3. Shell Programming and Scripting
Hi Gurus, kindly analyse the following for me, please
OS: Windows 7
Code location: C:\
Output: "Program Files not being recognised"
"System Volume Information is a directory"
"Windows not being recognised"
main {
my @dirlist = <*>;
foreach my $fn... (0 Replies)
Discussion started by: biglau
0 Replies
4. Shell Programming and Scripting
I'm trying to figure out what's getting passed as the argument when I try to pass a directory as an argument, and I'm getting incredibly strange behavior. For example, from the command line I'm typing:
nawk -f ./test.awk ~
test.awk contains the following:
{
directory = $NF
print... (13 Replies)
Discussion started by: mrplainswalker
13 Replies
5. Shell Programming and Scripting
Hi all
First of all thanks for everyone to read by doubt.Am beginner in shell scripting
Following are my doubts
i have to pass an argument to shellscript how can i do that
second i have to test the argument and shows error when nothing is passes
third i have to match exact argument... (3 Replies)
Discussion started by: zeebala1981
3 Replies
6. Programming
hi could some body help me?
im making a program that writes in a file.txt
how can i compare my "char x" to another char?
#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
int main()
{
char x;
char y;
cout << "enter title" << endl; (0 Replies)
Discussion started by: rave03
0 Replies
7. Shell Programming and Scripting
i have this basic piece of code that i am trying to debug to accept input parameter to be able to display a directory listing of files.
cd /u02/app/eatv/dev/out
CURDIR=`pwd`
echo directory listing of $CURDIR
echo
if ; then
ls -latr
else
ls -latr $1
fi
basically if the script... (9 Replies)
Discussion started by: wtolentino
9 Replies
8. Shell Programming and Scripting
i have written this simple script called isdir.sh
#! /bin/bash
dir=$1
_ls=`ls $dir`
for file in $_ls
do
if
then
echo "D $file"
fi
donethe output is not right.
for example
$ ./isdir.sh src
***no output***
but i have in ~/src some directories
drwxr-xr-x 2... (5 Replies)
Discussion started by: and77
5 Replies
9. UNIX for Dummies Questions & Answers
hey guys
How can i test existence of a file /directory in a directory in a script
thanks (2 Replies)
Discussion started by: ajaya
2 Replies
10. Shell Programming and Scripting
When i am trying to
$uncompress tress.dmp.Z
I am getting tress.dmp.Z permission denied.
What action i have to perform to unzip or uncompress
It has rw-r--r-- permissions
When i am trying to change the permissions chmod 744 it says.
chmod: Warning: can't change tress.dmp.Z
Just... (1 Reply)
Discussion started by: dreams5617
1 Replies