10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have googled this and found many solutions, but none of them are working for me. I am in a korn shell, most others reference bsh, maybe that is the issue? Anyway, all I am trying to do is use a variable I have declared in my main script in a remote shell I am running through ssh.
So I have a... (8 Replies)
Discussion started by: DJR
8 Replies
2. Shell Programming and Scripting
Friends,
I observed a peculiar problem in shell.
if I set a variable using standard input and backspace was used by the user, then the variable get ^? characters embedded in the variable.
###
echo "Enter value for X="
read X
echo $X
expr $X + 1
###
If the variable is echoed, then there... (3 Replies)
Discussion started by: sachinverma
3 Replies
3. Shell Programming and Scripting
Hi,
I'm primarily a Cisco/Juniper networking guy, so you'll have to forgive my ignorance when it comes to scripting (although I do write simple backup scripts and things of that nature on a regular basis and I run Linux at home, so I am vaguely familiar with it). What I need to do should be... (2 Replies)
Discussion started by: wolverene13
2 Replies
4. Red Hat
Hey all, I am simply trying to find a listing of all of the default BASH environment variables in RHEL 5.4. Namely, I need to find what the path variable is for libraries since one of my applications doesn't see a module that it needs to run. So far I've seen $LD_PRELOAD, $LD_LIBRARY_PATH and... (4 Replies)
Discussion started by: msarro
4 Replies
5. Shell Programming and Scripting
Hello,
I have this problem.
I have script file, e.g.
#!/usr/bin/ksh
echo $MY_DIR
ls -lt $MY_DIR
I want to list the script but with MY_DIR variable expanded. E.g.
MY_DIR=/abc/xyz (in shell MY_DIR is set)
So I want to list the script and see:
#!/usr/bin/ksh
echo /abc/xyz
ls... (6 Replies)
Discussion started by: r1omen
6 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I need to run a command for a set of input variables that are present in a tab delimited file, a sample of which is shown below:
1 3749
1 4129
1 5980
2 6201
2 9925
2 6894
3 1338
3 6477
3 6242
3 3632
Every row represents the two input values... (2 Replies)
Discussion started by: Gussifinknottle
2 Replies
7. Shell Programming and Scripting
I am trying to take a list of directories in a folder and give them a variable name. I have this working with the exception that the shell_exec command wants to place a return. Here is my code which might explain better what I am trying to do:
<?php
session_start();
$student1=$_SESSION;... (0 Replies)
Discussion started by: robp2175
0 Replies
8. Shell Programming and Scripting
Hello,
I've created a couple of files within a list using the command "ls -ltr | tail -2 > list" These files are the newest files placed within a directory. From the "list" file, I need to place the filenames as a variable. In which the newest file will be called "new_ctrl" the older file... (4 Replies)
Discussion started by: petersf
4 Replies
9. UNIX for Dummies Questions & Answers
Hi everyone,
I have a file with multiple entries and I would like to remove the ones that contain either /A"> or /A/, where A can be any letter of the alphabet. Here's an example of the entries:
<Topic r:id="Top/World/Fran">
<catid>476</catid>
<link... (1 Reply)
Discussion started by: BlueberryPickle
1 Replies
10. UNIX for Dummies Questions & Answers
I have a directory which has 614,000 files.
When attempting to do an ls -ralt in the directory an error too many arguments is shown.
1. I would like to see what files and their stats in the directory
2. I would like to delete certain files of a certain age (3 Replies)
Discussion started by: dinplant
3 Replies