Sponsored Content
Top Forums Shell Programming and Scripting Repeat command with new variable for each line in txt file Post 302805073 by pasc on Thursday 9th of May 2013 03:22:51 PM
Old 05-09-2013
do I have to use brackets to make this work ?

like:

Code:
while read x do (
find /var/mobile/ maxdepth -2 name "$x" >> /"$x".txt
done < /var/mobile/names.txt)

??

If not: Mind explaining this further (perhaps showing directly how to apply this ?

Thanks.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

command to list .txt and .TXT file

Hi expersts, in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log I want list only .txt and .TXT files in one command... how to ?? //purple (1 Reply)
Discussion started by: thepurple
1 Replies

2. Shell Programming and Scripting

Problems reiterating values from txt file into a variable

Hi, I have written a script to retrieve phone numbers from an error log and output the phone numbers into an text file. I then use the list of phone numbers to process each value into a variable so I can run a sql query and update the database. My problem is I can only process the first value... (2 Replies)
Discussion started by: rdr411
2 Replies

3. Shell Programming and Scripting

Insert a line including Variable & Carriage Return / sed command as Variable

I want to instert Category:XXXXX into the 2. line something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong: sed "2i\\${n}Category:$cat\n" Sample: Titel Blahh Blahh abllk sdhsd sjdhf Blahh Blah Blahh Blahh Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies

4. UNIX for Dummies Questions & Answers

Command to delete numbers at beginning of txt file line

Hello. I have the following issue: my txt file has the following format: train/dr4/fklc0/sx175.txt 0 80282 Severe myopia contributed to Ron's inferiority complex. train/dr4/fklc0/sx355.txt 0 42906 Dolphins are intelligent marine mammals. train/dr4/fklc0/sa2.txt awk 'NR%2==0' test1.txt >... (4 Replies)
Discussion started by: li_bi
4 Replies

5. Shell Programming and Scripting

assigning variable in txt file

Hi all, One of my txt file has common format like . And I need to manually assign variable to "/a/b/c/file1/txt" , which has common text before "Calculated summary file:". I wonder if I can use some command to do that for me, that it read the file and check for that comonn text and assign... (2 Replies)
Discussion started by: emily
2 Replies

6. Shell Programming and Scripting

How to echo $variable into txt file?

Hello i tried many times echo $variables into text file with no success for example: echo "#!/bin/sh BBHTAG=RFOCLT_check # What we put in bb-hosts to trigger this test COLUMN=RFOCLT # Name of the column, often same as tag in bb-hosts $BBHOME/bin/bbhostgrep $BBHTAG | while read... (5 Replies)
Discussion started by: mogabr
5 Replies

7. Shell Programming and Scripting

Need to append the date | abcddate.txt to the first line of my txt file

I want to add/append the info in the following format to my.txt file. 20130702|abcd20130702.txt FN|SN|DOB I tried the below script but it throws me some exceptions. <#!/bin/sh dt = date '+%y%m%d'members; echo $dt+|+members+$dt; /usr/bin/awk -f BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Discussion started by: harik1982
6 Replies

8. Shell Programming and Scripting

Repeat for different variable

Hey, I've created following script: var1=test1 setA=testA if ... touch $setA/$var1 ... fi I would like now the repeat the command touch (in this example) for different variables. So below, the varX should run 3 times (var1, var2, var4). Var3 is skipped in this example... (4 Replies)
Discussion started by: brononius
4 Replies

9. UNIX for Dummies Questions & Answers

Split Every Line In Txt Into Separate Txt File, Named Same As The Line

Hi All Is there a way to export every line into new txt file where by the title of each txt output are same as the line ? I have this txt files containing names: Kandra Vanhooser Rhona Menefee Reynaldo Hutt Houston Rafferty Charmaine Lord Albertine Poucher Juana Maes Mitch Lobel... (2 Replies)
Discussion started by: Nexeu
2 Replies

10. Shell Programming and Scripting

Read in txt file and run a different command for each line

hi, i'm trying to write a tcsh script that reads in a text file (one column) and the runs a different command for each line of text. i've found lots of example commands for bash, but not for tcsh. can anyone give me a hint? thanks, jill (8 Replies)
Discussion started by: giuinha
8 Replies
mipagent(1M)						  System Administration Commands					      mipagent(1M)

NAME
mipagent - Mobile IP agent SYNOPSIS
/usr/lib/inet/mipagent DESCRIPTION
The mipagent utility implements the Mobile IP home agent and foreign agent functionality described in RFC 2002, IP Mobility Support. The term "mobility agent" is used to refer to the home agent and foreign agent functionality collectively. mipagent responds to Mobile IP reg- istration and deregistration requests and router discovery solicitation messages from a mobile node. Besides responding to external mes- sages, the mipagent utility also tasks on a periodic basis, such as aging the mobility bindings and visitor entries and sending agent advertisements. The mobility agent can also handle direct delivery style reverse tunneling as specified in RFC 2344, Reverse Tunneling for Mobile IP. Limited private address support for mobile nodes is also available. In addition, separate IPsec policies for registration requests, replies, and tunnel traffic can be configured to protect the datagrams associated with these between two mobility agents. Run the mipagent daemon as root using the start-up script, which has the following syntax: example# /etc/init.d/mipagent [start|stop] /etc/inet/mipagent.conf must be present before you start-up the mipagent daemon. See mipagent.conf(4). At start up, mipagent reads the con- figuration information from /etc/inet/mipagent.conf. The mipagent daemon records a continuous log of its activities by means of syslog(). See syslog(3C). You can use the LogVerbosity parameter in /etc/inet/mipagent.conf to control the verbosity level of the log. The mipagent daemon can be terminated either by the script: example# /etc/init.d/mipagent stop or by the kill command. Periodically while running, or if terminated or shutdown, the mipagent daemon stores the following internal state information in /var/inet/mipagent_state: o a list of the mobile nodes supported as home agents; o their current care-of addresses; and o the remaining registration lifetimes. If the mipagent utility is terminated for maintenance and restarted, mipagent_state is used to recreate as much of the mobility agent's internal state as possible. This minimizes service disruption for mobile nodes that may be visiting other networks. If mipagent_state exists, it is read immediately after mipagent.conf when mipagent is restarted. The format of mipagent_state is undocumented since it is likely to change and programs other than mipagent should not use it for any purpose. A separate utility program mipagentstat is provided for monitoring mipagent. EXIT STATUS
The following exit values are returned: 0 The daemon started successfully. -1 The daemon failed to start. FILES
/etc/inet/mipagent.conf Configuration file for Mobile IP mobility agent. /var/inet/mipagent_state File where private state information from mipagent is stored. /etc/init.d/mipagent [start|stop] mipagent start-up script. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWmipu | +-----------------------------+-----------------------------+ SEE ALSO
mipagentstat(1M), mipagentconfig(1M), syslog(3C), mipagent.conf(4), attributes(5) Montenegro, G., editor.RFC 2344, Reverse Tunneling for Mobile IP. Network Working Group. May 1998. Perkins, C. RFC 2002, IP Mobility Support. Network Working Group. October 1996. DIAGNOSTICS
The mipagent utility exits with an error if the configuration file, mipagent.conf, cannot be read successfully. Upon receiving a SIGTERM or SIGINT signal, mipagent cleans its internal state, including any changes to the routing and ARP tables, and exits. NOTES
The foreign agent adds host- specific local routes to its routing table for visiting mobile nodes after they are successfully registered. If a visiting mobile node departs without sending a de-registration message through the foreign agent, these routing entries persist until the mobile node's previous registration expires. Any packets that arrive at the foreign agent for the departed mobile node during this time, for example because the foreign agent is also a router for the foreign network, will be lost. System administrators can configure foreign agents to accept only short registration lifetimes. This will automatically restrict the maximum duration for which a departed mobile node will be temporarily unreachable. Home and foreign agents dynamically add and delete IPsec policies configured with a mobility agent peer. Those pertaining to the tunnel are only added when the tunnel is plumbed. At this time, IPsec tunnel policies must be identical in the forward and reverse direction. IPsec policies pertaining to permiting registration requests on the home agent are added to the IPsec policy file at init time as it must be ready to receive these at any time. Otherwise, IPsec policies pertaining to registration request and reply messages with a mobility agent peer are added as soon as they are needed, and are not removed until all mobile nodes are no longer registered with the mobility agent peer, at which point the tunnels are torn down. SunOS 5.10 11 Dec 2001 mipagent(1M)
All times are GMT -4. The time now is 01:03 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy