Sponsored Content
Top Forums Shell Programming and Scripting Append variable value with sed Post 302889707 by vskr72 on Sunday 23rd of February 2014 10:58:15 AM
Old 02-23-2014
Thank you. Both the solutions work. But I have another question. Why do we have to give the substitution part in the 2nd line. Cant I give the whole command in one line? I tried and it did not work. Appreciate your inputs.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract Variable and Append it to the file

I have a file named xyz_extract_file_20091201.dat and I need to strip out 20091201 from the file name and append this value as a first field in all the records in the file. Can you please help? Thanks. Eg. Input File: xyz_extract_file_20091201.dat ------------ Campaign1,A2347,Grp_id1... (1 Reply)
Discussion started by: shekharaj
1 Replies

2. Shell Programming and Scripting

Append variable to only certain lines

Hi There! I'm trying to write a shell script which generates a random hexadecimal number and then appends it to the end of lines XX onwards of a certain file. XX is determined by a certain string on the previous line. Thus for example, if the input file is I search for the string... (3 Replies)
Discussion started by: orno
3 Replies

3. Shell Programming and Scripting

How to append using sed

Hello all, I want to use sed to append a variable stored in $i, how do i do that? $i contains a path to a directory and i want to append it before the result i get from awk statement, before affecting awk results. rite now out put i get from code below is:- The path is:... (2 Replies)
Discussion started by: asirohi
2 Replies

4. Shell Programming and Scripting

Append zeros before a value as per variable

Hello- I have a variable which contains a number, I need to populate number of zeros before another value as per this variable value. for example: I have variable X whose content is 5, variable Y whose content is 123 Now append number of zeros as per variable X before varible 'Y'... (4 Replies)
Discussion started by: pasupuleti81
4 Replies

5. UNIX for Dummies Questions & Answers

how do I append new lines to awk variable?

I want to build an array using awk, consisting only of a subset of lines of a file. I know how to have awk assess whether a key phrase is in a particular line, but I can't find anywhere how to then append the line containing that phrase to an array that has previously-found lines also containing... (9 Replies)
Discussion started by: pts2
9 Replies

6. Shell Programming and Scripting

append to same string variable in loop

I want to append values to same string variable inside a recursive function that I have .. I do not want to write to any file but use a variable.. Can anyone please help with it? Thanks in advance. (6 Replies)
Discussion started by: Prev
6 Replies

7. Shell Programming and Scripting

Append 0 to a variable

Hi, I have a variable... it can take a value from 1 to 99... now when it is 1 to 9 i want to save it as 01 to 09 in the same variable... can this be done using sed or awk??? a=1 i want it as a=01 Thanks in advance... (8 Replies)
Discussion started by: Nithz
8 Replies

8. Programming

C program to read n files and append it to a variable.

I am struck in the code of handling multiple files reading and appending it into a variable. My First file's entire content I have concatenated using strcat(<char pointer>,char array) In the Second file I extract using strtstr() function and below is the code. if( fp2 != NULL){ ... (2 Replies)
Discussion started by: gameboy87
2 Replies

9. Shell Programming and Scripting

How to Append data to the content at the beginning of a variable?

Hi Guys, IF i have to append data to a variable, i simply use the following. What can i do to append data to the beginning? VAR+="data" (6 Replies)
Discussion started by: srkmish
6 Replies

10. Shell Programming and Scripting

Bash - proper way to append variable to stderr

Hello, Can you please if the bellow is the proper way of appending a variable to the stderr: The easiest way to test this,I was able to imagine, was by touching 5 files and afterwards looping trough to the results: -rw-r--r-- 1 ab owner 0 Sep 14 13:45 file1 -rw-r--r-- 1 ab owner 0 Sep... (7 Replies)
Discussion started by: alex2005
7 Replies
uusched(8)						      System Manager's Manual							uusched(8)

NAME
uusched - Schedules work for the file transport program SYNOPSIS
uusched [-u DebugLevel] [-x DebugLevel] FLAGS
Passed to the uucico daemon as the -xDebugLevel flag. The DebugLevel variable is a number from 0 to 9, with a default of 5. Higher num- bers give more detailed debugging information, which is displayed on the screen of the local system. Outputs debugging messages from the uusched daemon. The DebugLevel variable is a number from 0 to 9, with a default of 5. Higher numbers give more detailed debugging informa- tion, which is displayed on the screen of the local system. DESCRIPTION
The uusched daemon schedules work for the uucp file transport program, uucico. It schedules the transfer of files that are queued in the /usr/spool/uucp/SystemName directory. The scheduling daemon first randomizes the work and then starts the uucico daemon, which transfers the files. The uusched daemon is usually started by the uudemon.hour shell procedure, which is run periodically by the cron daemon. The uusched daemon can also be started from the command line for debugging purposes. EXAMPLES
To start the uusched daemon from the command line, enter: /usr/lib/uucp/uusched & FILES
Specifies the command path RELATED INFORMATION
Commands: uucp(1), uustat(1), Daemons: cron(8), uucico(8) uux(1) delim off uusched(8)
All times are GMT -4. The time now is 08:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy