Questions tagged [unix-shell]

124 questions
0
votes
1 answer

How to run a program inside chroot with stdin/stdout available to caller?

Is there a way to run a program in a chroot while still having access to stdin/stdout? My first attempt was a shell script: /usr/local/bin/real-app: -------- #!/bin/bash chroot /var/lib/app-root /usr/bin/app $* Then symlinked it where things…
Mark Renouf
  • 1,353
  • 1
  • 16
  • 22
0
votes
2 answers

Moving files between hosts using intermediate storage area

Is there any good existing solution for moving files from host A to host C, using host B a an passive intermediate storage area. A -> B -> C Limitations Host A and host C are on separate networks and can not access each other. No tunnels can be…
error
  • 117
  • 1
0
votes
2 answers

Can I trust that every Debian-derived distro will have a 'base-files' package that contains '/etc/debian_version'?

What I want is a quick, reliable command to ascertain that the Linux I'm running in is Debian-based. The following command seems to work. It also returns the Debian version: dpkg -L base-files 2>/dev/null | grep '^/etc/debian_version$' >/dev/null…
JCCyC
  • 670
  • 2
  • 13
  • 24
0
votes
1 answer

Executing command remotely on another linux server from a shell script

I have a shell-script which extract details from a log file between two dates and executes a command on the output to generate some report.The log files are on different server and scripts are executed on different server. the Script looks like : …
anand
  • 152
  • 6
0
votes
5 answers

removing duplicate lines from file with grep

I want to remove all lines where the second column is 05408736032. 0009300|05408736032|89|01|001|0|0|0|1|NNNNNNYNNNNNNNNN|asdf| 0009367|05408736032|89|01|001|0|0|0|1|NNNNNNYNNNNNNNNN|adff|
user5967
  • 135
  • 2
  • 6
0
votes
1 answer

unable to run the script in linux using plink

I'm unable to run a script in linux using plink.exe. I'm using my user x to login and script is under y user, which I need to sudo to y and run it. I was able to at command prompt manually but not through script (for automation). plink.exe -v -t -l…
0
votes
1 answer

Fix Solaris 11 GNU tools location for RVM

I am trying to install RVM on a Solaris 11 system, the curl -sSL https://get.rvm.io | bash -s stable went through, but when I actually try to use rvm, it simply stats "ERROR: Missing GNU tools: grep which awk cp date find sed tail tar xargs. Make…
Metaphox
  • 101
  • 2
0
votes
2 answers

redirect command executed along with output shell

I would like to redirect the command executed along with the output to a file. for example: #ls >ls_out.txt ls_out.txt should be something like : ls file1 fil2 Thanks!
kumar
  • 423
  • 2
  • 9
  • 23
0
votes
1 answer

Check processor status- check processor/cpu status and failed/off status

I want to Check processor status- check processor/cpu status and failed/off status so for that I used command prtdiag and want to fetch the cpu status only from that. how can i do that?
0
votes
1 answer

I want to save events or logs grabbed using Inotify to a file

I need your help - using Inotify I am watching a directory for the changes like create, delete, rename and move. I want these event to be logged in a file and I want to run Inotify as a service.
0
votes
2 answers

How to secure svn+ssh checkout users?

All our SVN repositories are hosted on a dedicated machine on which all the developers have access. Every now and then we need to checkout a repository on a machine we don't own or operate ourselves. Currently we all use our own system (SSH) account…
vincent.io
  • 935
  • 3
  • 8
  • 23
0
votes
4 answers

Chars referenced by octal values in *NIX shell scripts -- getting them to be parsed?

I have a script which absolutely 100% _has_ to be done in this ridiculous fashion: echo $'\150\151\073\145\143\150\157' $'\171\141\171' (unencoded: echo hi;echo yay) The problem is that everything after the echo is assumed to be an argument, so the…
Jim
  • 1
0
votes
1 answer

Shell command to find and file the last modified file in a certain directory

I want to create an alias that displays the latest log in a certain directory - something like: ls -lat *log* | tail -1 | less The above command does not work as the output of the ls -lat command does not produce a single final name but a full list…
RonK
  • 241
  • 1
  • 5
  • 13
0
votes
3 answers

how to find the weblogic server start time in unix box

how to find the weblogic server start time in unix. i have give ps -f | grep port number but it is showing my current system time. how to find this
Navadeep
  • 1
  • 2
  • 2
0
votes
2 answers

What are best practices writing parallel startup scripts in Unix shell (ksh,bash)?

I have a piece of software with different components running on the same Unix machine (web server, DBMS, middleware, different daemons). Startup of the few components depends on the success of the start of the previous ones (like DBMS). Some of the…
1 2 3
8 9