Search Results

Search: Posts Made By: midhun3108
2,715
Posted By Corona688
Run like: ksh script.sh...
Run like:
ksh script.sh /path/to/filename12345.txt

Inside:
#!/bin/ksh

# $1 = filename12345.txt
set -- $(echo "$1" | tr -cd '0-9')
# $1 is now 12345

# rest of program
2,715
Posted By Corona688
ksh scriptname $(cat filename)
ksh scriptname $(cat filename)
2,357
Posted By RavinderSingh13
Hello sand1234, Could you please try...
Hello sand1234,

Could you please try following.


awk '{printf("%s%s",$0~/^[0-9]+/ && FNR>1?ORS:FNR==1?"":OFS,$0)}' Input_file


Output will be as follows.


2019 Sep 28 10:47:24.695...
6,120
Posted By RudiC
Not sure I get what you want. How far would this...
Not sure I get what you want. How far would this get you (assuming your shell, which you fail to mention, being bash):



RT=(SUCCESS WARNING FAILURE)
echo "Files loaded with ${RT[$(grep -i...
6,120
Posted By jim mcnamara
By "append" your mean change the subject line - I...
By "append" your mean change the subject line - I think.
Let's tidy up the "script":

# Assume failure
code="FAIL"
# silently check the input file, if okay change the code
grep -q 'Return code...
5,247
Posted By drysdalk
Hi, There's a few ways to approach this, but...
Hi,

There's a few ways to approach this, but using the find command as you're starting to do will certainly do the trick. However, as things stand, your find command isn't actually going to do...
5,247
Posted By bakunin
OK, this is a good start. The find utility...
OK, this is a good start. The find utility provides a list of filenames fitting the clauses you specifiy. Here is the principle of how it works. I suggest you try the following commands on the...
Showing results 1 to 7 of 7

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