Search Results

Search: Posts Made By: CKT_newbie88
5,669
Posted By CKT_newbie88
I am trying to invoke a service remotely (via...
I am trying to invoke a service remotely (via ssh)...I tried the nohup option into the script. Instead of hanging, I need a 'keystroke' to initiate back a command prompt. Is there a way to invoke a...
5,669
Posted By CKT_newbie88
Exit Shell Script with background job
Hi all,

I am trying to exit a shell script (c shell) while invoking a job (service) that must run in the background:
......

/mydir/runservice &

exit
......

There are downstream jobs and...
8,536
Posted By CKT_newbie88
Thanks for the tips, I am now trying to...
Thanks for the tips,

I am now trying to capture the elapsed time into a variable in (C Shell). I would like to 'echo' the start time, end time and time elapsed - along with other variables and...
8,536
Posted By CKT_newbie88
How would I put this in a shell script? ...
How would I put this in a shell script?

Should I set as variable at the beginnning of the script and call at the end? Or should I call it at the end of the script?

Can you explain the...
8,536
Posted By CKT_newbie88
Shell Runtime Statistics
Hi,

I am trying to capture runtime stats of a shell script (c shell). Are there system variables to call? Or should I create a date variable at the start of the script and at the end of the...
7,565
Posted By CKT_newbie88
Passing Variable Parameters (C shell)
I am trying to execute a copy command via shell script. However, on occassion, 2 or more files need to copied. How do I code for the multiple arguments? Does it matter how the files are delimited?...
16,197
Posted By CKT_newbie88
Thanks for the advice - job works!
Thanks for the advice - job works!
16,197
Posted By CKT_newbie88
I tried those options, but when I use the [ -f...
I tried those options, but when I use the [ -f $filename ] - I get a 'Missing ]' error and when I use the

if (test -f $filename) - I get a 'if Syntax error'.

I use the $status method...but it...
16,197
Posted By CKT_newbie88
Verify File exists and execute command
Hi,

I am trying to verify that a file exists within an alternate directory. If the file exists, it will execute a copy command...if it does not, it should exit the script.

I tried the <test>...
2,416
Posted By CKT_newbie88
I am getting awk: syntax error near line 1...
I am getting

awk: syntax error near line 1
awk: illegal statement near line 1
2,416
Posted By CKT_newbie88
"Bob"~"2001"~1234 "Nancy"~"2008"~456 ...
"Bob"~"2001"~1234
"Nancy"~"2008"~456
"Peter"~"2002"~5433
"Jack"~"2007"~3241
"Rose"~"2002"~9986

Here is a sample. I'd like to get a Max Year value from the second column (basically return...
2,416
Posted By CKT_newbie88
sed/awk to retrieve max year in column
I am trying to retrieve that max 'year' in a text file that is delimited by tilde (~). It is the second column and the values may be in Char format (double quoted) and have duplicate values.
...
3,396
Posted By CKT_newbie88
Hi Franklin52, I tried the code again, and...
Hi Franklin52,

I tried the code again, and the same result occurs.

Is there a way to add a space when we combine the rows?

1234,"abcd",4569,"My Name is JackSmith","JS123","1900-01-01"...
3,396
Posted By CKT_newbie88
Hi Franklin52, I tried the code you...
Hi Franklin52,

I tried the code you supplied - it had an error:

awk: syntax error near line 1
awk: illegal statement near line 1

I also tried it with 'gawk' and it modified some...
3,396
Posted By CKT_newbie88
Due to sensitive data, the following is a sample...
Due to sensitive data, the following is a sample of 4 lines of data (in reality, the file contains 18 fields with the 11th field being problematic - since it is a Varchar 256 free-from field). All...
3,396
Posted By CKT_newbie88
There are actually 2 issues 1. A fixed with...
There are actually 2 issues
1. A fixed with record with multiple \n instances with \n as its record delimiter
2. A comma delimited file with \n embedded in the record with \n as its record...
1,392
Posted By CKT_newbie88
SED or AWK
As an alternative solution, I am now trying to remove \n from a record that is comma delimited (instead of fixed width) and NOT remove the record delimiter (\n.)

Expected result:
"ABCD",1234,"My...
3,396
Posted By CKT_newbie88
Removing \n within a record (awk/gawk)
I am using a solution that was provided by a member:

awk '{s=$0;if(length(s) < 700){getline; s=s " " $0}printf("%s\n",s)}'

This scans through a file and removes '\n' within a record but not...
1,675
Posted By CKT_newbie88
Calling Multiple Scripts - stops after 1
I have created a script to call 2-3 shell scripts to be execute in succession, however, it seems that after the first shell script completes, the entire script exits out.

Example:
1stJob.sh...
26,991
Posted By CKT_newbie88
AWK limit for (length) function?
I am trying to use the following code:

awk '{s=$0;if(length(s) < 750){getline; s=s " " $0}printf("%s\n",s)}' filename

but an error shows that 'awk' is too long. Is there a limit to the awk...
3,550
Posted By CKT_newbie88
Thanks - that is what I was looking for. I...
Thanks - that is what I was looking for.

I actually have another file that has the same problem, however, its fixed width is around 750 Char - I applied the code, but an error shows that awk was...
3,550
Posted By CKT_newbie88
Hi Devaraj, I stumbled onto another...
Hi Devaraj,

I stumbled onto another 'error', since it is a fixed length records (and when I removed the (\n) it also truncated an extra 'space' - how can I run the same awk code but instead pad...
3,550
Posted By CKT_newbie88
Thanks! your code works like a charm! (with...
Thanks! your code works like a charm! (with obvious change to fix width length).

Much appreciated!!!
3,550
Posted By CKT_newbie88
I've give you an example, since data is senstive....
I've give you an example, since data is senstive. It is a fixed width file downloaded from Mainframe via FTP. This is the what the file would look like (in Unix Env).

Col1 Char5
Col2 Char5...
3,550
Posted By CKT_newbie88
The record delimiter is also a line feed (\n) ...
The record delimiter is also a line feed (\n)

Thanks
Showing results 1 to 25 of 26

 
All times are GMT -4. The time now is 09:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy