New to scripting and I can't seem to make this script work any help would be great
ps -ef | grep "telnet 10.0.32.36 1011" | nawk '{print $2}' > pidchk
ids=`cat pidchk`
if ($ids < 0)
then
echo restart
else
echo good
fi
I keep getting this error from the script. the name of...
I wouldn't begin to know how to use expect for this function. The down and dirty is that I need to create a connection that can stay up for 24hours and log everything that comes across to the machine that is initiating the connection. This also has to be done through cron since the connection...
I am trying the following
nohup telnet 10.10.10.10 1003 > /home/myfile &
and everytime I exit it kills the telnet. I thought nohup was suppose to allow me to run a command and then be able to logout without the command being killed? Am I lost on this or just doing someting wrong?
I have a terminal server that is connected to another box with a constant flow of data across the link. I need to connect to the terminal server and log everything that comes across this link. I have tried using telnet but of course there is no way that I know of to make this telnet run in the...
I am telneting to a box that has an output flowing from another box
When I telnet and redirect output to a file and then tail the file I see the output normal. When I VI the file I see > ^H ^H^H ^H
Can anyone tell me how to stop this from happening?
If this is the wrong forum for this...
I have a outfile that has nothing but time stamps and I need to parse through it and just grab the first two different times I colored them in red. The actual file has many more lines of repeating time stamps but I shortend for this post. Please help!!!
23:59:34
23:59:34
23:59:34
23:59:34...
I have the following line in a script. Is it possbile to change the red text to an inputted variable? such as $1 an then type script variable??
nawk '/TIME/ {currtime=$2} /SECTION 12:/ {sec=$1" " $2" " $3" " $4} /SECTION 12:/ {print currtime " "sec}...
Below is a small piece of my data. For simplicity I labeled the columns $1 $2 and so on. from 00:00:00 to 22:00:00 $2 will be the same number Then at the next 00:00:00 it will change to a different number till 22:00:00 and so on. How can I get a script to look between 00:00:00 and 22:00:00...
I was given this script by pmurray99, thank you very very much, below is the script and then below that is a small piece of the data I am using it on and then the Results. If you notice at the very top of the results it took the first line for 750 (which should be the 00:00:00 line) and placed...
Ok... I made the following changes to the shell version and it works up till I get to the lines in red. Or at least this is the line(s) I added and then it stopped all other added lines work perfect up till I added this one.
I get the following error:
testscript[52]: 00:29:420: syntax error...
Ok, I messed up by not puting an acurate description of my data... The actual data is 19 columns not inlcuding the time stamp. after the time stamp the is 2 tabs and 11 spaces. I don't know if this matters. the actual header I add in later. Sorry for not descibing it better at first.
I have data that looks sorta like this, only the lines are much longer, Is it possible to make a script that will combine the two lines in only certain columns?
Time TG INS OOS USG
01:39:42 50 25 10 1
01:59:42 50 25 10 10
02:39:42 50 25 10 2
02:59:42 50 25...
Thanks Hemo but the problem is this file is HUGE!! I only cut a small tid bit to show as well as when I cat the file it drops the Time Stamp that I need
Ok when I VI a file I see the following
23:59:41^M SECTION 12: TRUNK GROUP^M
ID TGNAME^M
50^M
51^M
52^M
53^M
ID IPC OPC OFL MTU USG ITUSG OTUSG^M
50 0 7 0 0 0 0 0^M...
Is there a way to look at the first number and if that number is lets say 56 then print that line? also I would need the time stamp to be on the line it prints
22:30:30
50 25 37 45 50
51 22 99 66 83
52 45 67 23 50
53 123 12 123 445
22:30:30
56 23...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.