10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies
2. UNIX for Dummies Questions & Answers
I'm making an sftp-connection to a remote server. I want the result of an ls-command in a local file and the result of ls on another folder in another local file. Because everything has to go as fast a possible I wan't to do everyting in one connection.
The command I use is : psftp -v -batch -b... (4 Replies)
Discussion started by: pistach
4 Replies
3. Shell Programming and Scripting
Hi!
i'm trying to parse textfiles against a pattern and storing the result in a variable.
The strings i want to get are embraced by and can occur several times in one line, so e.g.
some text anything else endwhat i have so far:
#!/bin/bash
for f in $*
do
exec 3<&0
exec 0<$f
... (2 Replies)
Discussion started by: thoni
2 Replies
4. Shell Programming and Scripting
#bash
curVer=`cat /var/sadm/clsversion | cut -f 2 -d "_"`
echo "CurVer:$curVer"
ls |grep -v tar| grep -v sh| grep -v log|cut -f 1 -d "_" | sort -u >tmp1
for line in $(cat tmp1)
do
ver=`echo $line_$curVer`
ls $line* |sort >tmp2
grep -n ${ver} tmp2 >/dev/null
... (2 Replies)
Discussion started by: rajamohan
2 Replies
5. OS X (Apple)
Can anyone tell me how to set up ssh and keychain so when I connect to the remote system it uses keychain for the password or public key? The remote system is FreeBSD 8.0. Do I need to setup anything else on that end?
Cheers. (0 Replies)
Discussion started by: Haggardly
0 Replies
6. UNIX Desktop Questions & Answers
Hi,
i have some files in one directory(say some sample dir) whose names will be like the following.
some_file1.txt
some_file2.txt.
i need to get the last modified file size based on file name pattern like some_
here i am able to get the value of the last modified file size using the... (5 Replies)
Discussion started by: eswarreddya
5 Replies
7. Shell Programming and Scripting
Hi Friends,
i have small issue,...
here is my problem............:)
i am using two unix box A and B ..using my script i am able to connect from A to B without password(using ssh option like below).
A:-> ssh user@B-2.10.32.23
but i declared one variable in A which is something... (5 Replies)
Discussion started by: Shahul
5 Replies
8. Shell Programming and Scripting
Hi All,
Command: grep -i -n "rule" *.err *.log | grep -v "SP_RULE"
The above command when run gives me two -three lines of output.
Now I am storing the result of the grep command
ie,
ruleerrors=`grep -i -n "rule" *.err *.log | grep -v "SP_RULE"`
Now when I echo the value of ruleerrors, I... (6 Replies)
Discussion started by: Sreejith_VK
6 Replies
9. Shell Programming and Scripting
For whatever reason I cant seem to fix my syntax to do the following. I want to run a grep and count how many instances come up and store that number in a variable but I keep erroring out. Here's my code in bash:
number=grep blah file.txt | wc -l (1 Reply)
Discussion started by: eltinator
1 Replies
10. Shell Programming and Scripting
Hi,
When i execute the below statement , the value is not getting stored in the variable.
AnneeExercice=`sqlplus $LOGSQL/$PASSWORDSQL << FIN >> $GEMOLOG/gemo_reprev_reel_data_ventil_$filiale.trc
SELECT bi09exercice
FROM bi09_scenario
WHERE bi09idfiliale=UPPER('de')
AND ... (1 Reply)
Discussion started by: krishna_gnv
1 Replies