Sponsored Content
Special Forums Windows & DOS: Issues & Discussions Trying to add text to the beginning of each line Post 302664971 by methyl on Sunday 1st of July 2012 07:03:17 PM
Old 07-01-2012
With Windows scripting, it always helps to mention the exact version of Windows and whether you have installed any extended Windows scripting products and whether you have any programming languages installed.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Add text to beginning of file

Hi I need to add text to the beginning of a file in the same way that cat will put file contents at the end of a file. I want to do this with many files eg cat newtext >> /usr/home/*/*.bat Any ideas? (2 Replies)
Discussion started by: donkey
2 Replies

2. Shell Programming and Scripting

add a number to the beginning of every line

hey, i would like to add a line number to the beginning like so: red blue green yellow will be: 1=>red 2=>blue 3=>green 4=>yellowplease advise thank u. (5 Replies)
Discussion started by: boaz733
5 Replies

3. Shell Programming and Scripting

trying to add text to beginning and end of each line

Well here goes: I tried to write a batch file that adds a specific fixed text to each line of an already existing text file. for the adding text infront of each line I tried this: for /F "delims=" %%j in (list.txt) do echo.STARTTEXT\%%j >> list.txt for adding text after each line I... (0 Replies)
Discussion started by: pasc
0 Replies

4. UNIX for Dummies Questions & Answers

Add word/value at the beginning of each line in a file

how to add value/word at the beginning of each line in a file ? i have file number.txt and the output is below 1000 1001 1002 1003 1004 i want to add 000 at the beginning of each line, desire output is below 0001000 0001001 0001002 0001003 0001004 and so on please advise how... (5 Replies)
Discussion started by: jason6247
5 Replies

5. UNIX for Dummies Questions & Answers

sed - Add a variable line to the end of a block beginning with a regex

Hi, Need some help with sed. I have a file that has sections : e.g. a=blah b=blah d=blah e=blah There's many sections in the file. (1 Reply)
Discussion started by: andyatit
1 Replies

6. Shell Programming and Scripting

How to add a text at the beginning of a text files in a folder?

how to add a text ( surya) at the beginning of a text files (so many) in folder text file: 111111 555555 666666 result: surya 111111 555555 666666 (3 Replies)
Discussion started by: suryanarayana
3 Replies

7. Shell Programming and Scripting

Adding a text in the beginning of a line

Hi, I am doing something like below: cat file1>file3and cat file2>>file3 I wanted to check if there is a way to write a custom message(hardcoded message)something like below at the beginning of each line then PIPE delimitiation and then followed by remaining record. cat file1... (7 Replies)
Discussion started by: Saanvi1
7 Replies

8. Shell Programming and Scripting

Add new line at beginning and end of a file

Hi, I have a specific requirement to add text at the beginning and end of a plain text file. I tried to use "sed" with '1i' and '$a' flags but these required two separate "sed" commands separated with "|". I am looking for some command/option to join these two in single command parameter. ... (6 Replies)
Discussion started by: bhupinder08
6 Replies

9. Shell Programming and Scripting

How to add one line in the beginning of the file?

Hi gurus, I need add one new line in the begining of current file. current file abc cde add xyz output file newline abc cde add xyz (6 Replies)
Discussion started by: ken6503
6 Replies

10. Shell Programming and Scripting

Insert text at the beginning of every even number line

i am trying to insert text at the beginning of every even number line with awk i can do it with odd number lines with this command awk 'NR%2{$0="some text "$0}1' filehow can i edit this command thanks (5 Replies)
Discussion started by: bob123
5 Replies
GAMMU-SMSD(1)							       Gammu							     GAMMU-SMSD(1)

NAME
gammu-smsd - SMS daemon for Gammu SYNOPSIS
gammu-smsd [OPTION]... DESCRIPTION
This manual page documents briefly the gammu-smsd command. gammu-smsd is a program that periodically scans GSM modem for received messages, stores them in defined storage and also sends messages enqueued in this storage. The daemon can reload configuration file after sending hangup signal (SIGHUP) and properly terminates itself on SIGINT and SIGTERM. Program accepts following options (please note that long options might be not accepted on some platforms): -h, --help Shows help. -v, --version Shows version information and compiled in features. -c, --config=file Configuration file to use, default is /etc/gammu-smsdrc, on Windows there is no default and configuration file path has to be always specified. If you run SMSD as a system daemon (or service), it is recommended to use absolute path to configuration file as startup directory might be different than you expect. See gammu-smsdrc for configuration file documentation. -p, --pid=file Lock file for storing pid, empty for no locking. Not supported on Windows. -U, --user=user Drop daemon privileges to chosed user after starting. -G, --group=group Drop daemon privileges to chosen group after starting. -d, --daemon Daemonize program on startup. Not supported on Windows. -i, --install-service Installs SMSD as a Windows service. -u, --uninstall-service Uninstalls SMSD as a Windows service. -s, --start-service Starts SMSD Windows service. -k, --stop-service Stops SMSD Windows service. -f, --max-failures=count Terminate after defined number of failures. Use 0 to not terminate (this is default). -X, --suicide=seconds Kills itself after number of seconds. -S, --run-service Runs pogram as SMSD Windows service. This should not be used manually, but only Windows Service manager should use this command. -n, --service-name=name Defines name of a Windows service. Each service requires an unique name, so if you want to run several SMSD instances, you have to name each service differently. Default is "GammuSMSD". -l, --use-log Use logging as configured in config file (default). -L, --no-use-log Do not use logging as configured in config file. -e, --install-event-log Installs Windows EventLog description to registry. New in version 1.31.90. -E, --uninstall-event-log Uninstalls Windows EventLog description to registry. New in version 1.31.90. SIGNALS
SMSD can be controlled using following POSIX signals (if your platform supports this): SIGHUP Reload configuration and reconnect to phone. SIGINT, SIGTERM Gracefully shutdown the daemon. SIGALRM Used internally for gammu-smsd -X SIGUSR1 Suspends SMSD operartion, closing connection to phone and database. SIGUSR2 Resumes SMSD operattion (after previous suspend). Changed in version 1.22.91: Added support for SIGHUP. Changed in version 1.22.95: Added support for SIGALRM. Changed in version 1.31.90: Added support for SIGUSR1 and SIGUSR2. EXAMPLES
Linux/Unix Examples Start SMSD as a daemon on Linux: gammu-smsd --config /etc/gammu-smsdrc --pid /var/run/gammu-smsd.pid --daemon Start SMSD as a daemon on Linux with reduced privileges: gammu-smsd --config /etc/gammu-smsdrc --pid /var/run/gammu-smsd.pid --daemon --user gammu --group gammu SMSD as a system wide daemon To use SMSD as a daemon, you might want to use init script which is shipped with Gammu in contrib/init directory. It is not installed by default, either install it manually or check INSTALL file for instructions. Under Windows 7 you might need to disable UAC (user account control) before you will be able to install SMSD service. Windows Service Examples Install Gammu SMSD Windows service: gammu-smsd.exe -c c:Gammusmsdrc -i Install two instances of SMSD Windows service: gammu-smsd.exe -c c:Gammusmsdrc-1 -n Gammu-first-phone -i gammu-smsd.exe -c c:Gammusmsdrc-2 -n Gammu-second-phone -i To uninstall a Windows service: gammu-smsd.exe -u Troubleshooting Windows Service If Gammu fails to start as a Windows service (you will usually get "Error 1053: The service did not respond to the start or control request in a timely fashion"), first check your SMSD logs. If they do not contain any useful hint, try starting SMSD manually with exactly same parameters as you installed the service (without -i). For example the command line can look like: gammu-smsd.exe -c smsdrc You now should be able to get errors from SMSD even if it fails to start as a service. KNOWN LIMITATIONS
You can not use same phone by more programs in same time. However in case you did not enable locking in [gammu] section, it might be able to start the communication with phone from more programs. In this case neither of the programs will probably work. There is no way to detect that SMS message is reply to another by looking at message headers. The only way to achieve this is to add some token to the message and let the user include it in the message on reply. AUTHOR
Michal iha <michal@cihar.com> COPYRIGHT
2009-2012, Michal iha <michal@cihar.com> 1.31.90 February 24, 2012 GAMMU-SMSD(1)
All times are GMT -4. The time now is 12:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy